A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sorting Worksheets in a workbook



 
 
Thread Tools Display Modes
  #1  
Old May 20th, 2010, 01:54 AM posted to microsoft.public.excel.worksheet.functions
Doehead
external usenet poster
 
Posts: 18
Default Sorting Worksheets in a workbook

Hi all, I am trying to use Cpearson's VBA procedure 'Sorting by Name' but I
am not sure -- do I have to copy and save it into every worksheet? My
workbook has 43 tabs so far. Thanks
  #2  
Old May 20th, 2010, 02:10 AM posted to microsoft.public.excel.worksheet.functions
ozgrid.com
external usenet poster
 
Posts: 328
Default Sorting Worksheets in a workbook

See http://www.ozgrid.com/VBA/sort-sheets.htm



--
Regards
Dave Hawley
www.ozgrid.com
"Doehead" wrote in message
...
Hi all, I am trying to use Cpearson's VBA procedure 'Sorting by Name' but
I
am not sure -- do I have to copy and save it into every worksheet? My
workbook has 43 tabs so far. Thanks


  #3  
Old May 20th, 2010, 04:10 AM posted to microsoft.public.excel.worksheet.functions
Doehead
external usenet poster
 
Posts: 18
Default Sorting Worksheets in a workbook

Hi Dave, I did as was instructed by the website but I got a 'Compile Error'
any idea why?

"ozgrid.com" wrote:

See http://www.ozgrid.com/VBA/sort-sheets.htm



--
Regards
Dave Hawley
www.ozgrid.com
"Doehead" wrote in message
...
Hi all, I am trying to use Cpearson's VBA procedure 'Sorting by Name' but
I
am not sure -- do I have to copy and save it into every worksheet? My
workbook has 43 tabs so far. Thanks


.

  #4  
Old May 20th, 2010, 06:24 AM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Sorting Worksheets in a workbook

Remove the blank line between the below two lines...and Dave's code should
work fine. A space followed by _ is a line separator

lReply = MsgBox("To sort .............

& "To sort Worksheets ...........

'remove the blank line (as below) so that VBE considers this as one line

lReply = MsgBox("To sort .............
& "To sort Worksheets ...........


--
Jacob (MVP - Excel)


"Doehead" wrote:

Hi Dave, I did as was instructed by the website but I got a 'Compile Error'
any idea why?

"ozgrid.com" wrote:

See http://www.ozgrid.com/VBA/sort-sheets.htm



--
Regards
Dave Hawley
www.ozgrid.com
"Doehead" wrote in message
...
Hi all, I am trying to use Cpearson's VBA procedure 'Sorting by Name' but
I
am not sure -- do I have to copy and save it into every worksheet? My
workbook has 43 tabs so far. Thanks


.

  #5  
Old May 20th, 2010, 06:36 AM posted to microsoft.public.excel.worksheet.functions
ozgrid.com
external usenet poster
 
Posts: 328
Default Sorting Worksheets in a workbook

Thanks Jacob, damn line breaks


--
Regards
Dave Hawley
www.ozgrid.com
"Jacob Skaria" wrote in message
...
Remove the blank line between the below two lines...and Dave's code should
work fine. A space followed by _ is a line separator

lReply = MsgBox("To sort .............

& "To sort Worksheets ...........

'remove the blank line (as below) so that VBE considers this as one line

lReply = MsgBox("To sort .............
& "To sort Worksheets ...........


--
Jacob (MVP - Excel)


"Doehead" wrote:

Hi Dave, I did as was instructed by the website but I got a 'Compile
Error'
any idea why?

"ozgrid.com" wrote:

See http://www.ozgrid.com/VBA/sort-sheets.htm



--
Regards
Dave Hawley
www.ozgrid.com
"Doehead" wrote in message
...
Hi all, I am trying to use Cpearson's VBA procedure 'Sorting by Name'
but
I
am not sure -- do I have to copy and save it into every worksheet? My
workbook has 43 tabs so far. Thanks

.


  #6  
Old May 21st, 2010, 12:20 AM posted to microsoft.public.excel.worksheet.functions
Chip Pearson
external usenet poster
 
Posts: 1,343
Default Sorting Worksheets in a workbook


Download the bas module zip file from
http://www.cpearson.com/Zips/modSortingWorksheets.zip, save it to some
folder (it doesn't matter where), and unzip the file. In VBA, go to
the File menu, choose Import and import the unzipped module.

Run the Sub named SortTheSheets to sort all the worksheets in the
workbook using the default values for the parameters to the main sort
procedure.

You need only one copy of the code, but the code must reside in a code
module, not one of the Sheet modules and not the ThisWorkbook code
module.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com






On Wed, 19 May 2010 17:54:01 -0700, Doehead
wrote:

Hi all, I am trying to use Cpearson's VBA procedure 'Sorting by Name' but I
am not sure -- do I have to copy and save it into every worksheet? My
workbook has 43 tabs so far. Thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.