Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default SORTING WORKSHEET TABS

I need help with the VB project listed on Pearson's webpage for sorting and
ordering tabs within a worksheeet.

I tried to follow the directions given for other posters regarding this same
subject but I am missing something becasue I cannot get the macro to work.

First when I try it (by just copying the code straight from the webpage and
inserting into VB) - I do not get a macro at all to come up to select when I
click ALT F8 to bring up the macro dialog box. Once I insert the code that
"calls it up" as suggested by Dave Petersen in a post dated 7/15/08 which is
the following:

Option Explicit
Sub testme()
If SortWorksheetsByName(0, 0, "", False) = False Then
MsgBox "something bad happened"
Else
MsgBox "ok--check the sheets"
End If
End Sub


and then I press ALT F8 to run it - I get an error message saying that the
Compile Error - Sub or Function not defined...
and TestFirstLastSort is highlighted on this line (the one that starts with
B):

'''''''''''''''''''''''''''''''''''''''
' More than one sheet selected. We
' can sort only if the selected
' sheet are adjacent.
'''''''''''''''''''''''''''''''''''''''
B = TestFirstLastSort(FirstToSort, LastToSort, ErrorText)

so, obviously I am missing something.. I never have had this much trouble
copying and pasting any of the code so generously shared here on these forums
so I am sure it is definitely user error..

I appreciate any guidance that could be given!!
Thank you.




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default SORTING WORKSHEET TABS*NEVER MIND**

PLEASE.. Never mind! I figured it out.. I had neglected a very important
piece of Mr. Pearson's code that is provided at the bottom of the webpage..
once I had that, it worked like a charm!!!

THANK YOU!!!!!!!!!!!!!


"Tree" wrote:

I need help with the VB project listed on Pearson's webpage for sorting and
ordering tabs within a worksheeet.

I tried to follow the directions given for other posters regarding this same
subject but I am missing something becasue I cannot get the macro to work.

First when I try it (by just copying the code straight from the webpage and
inserting into VB) - I do not get a macro at all to come up to select when I
click ALT F8 to bring up the macro dialog box. Once I insert the code that
"calls it up" as suggested by Dave Petersen in a post dated 7/15/08 which is
the following:

Option Explicit
Sub testme()
If SortWorksheetsByName(0, 0, "", False) = False Then
MsgBox "something bad happened"
Else
MsgBox "ok--check the sheets"
End If
End Sub


and then I press ALT F8 to run it - I get an error message saying that the
Compile Error - Sub or Function not defined...
and TestFirstLastSort is highlighted on this line (the one that starts with
B):

'''''''''''''''''''''''''''''''''''''''
' More than one sheet selected. We
' can sort only if the selected
' sheet are adjacent.
'''''''''''''''''''''''''''''''''''''''
B = TestFirstLastSort(FirstToSort, LastToSort, ErrorText)

so, obviously I am missing something.. I never have had this much trouble
copying and pasting any of the code so generously shared here on these forums
so I am sure it is definitely user error..

I appreciate any guidance that could be given!!
Thank you.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting Worksheet Tabs Craig Excel Discussion (Misc queries) 1 April 21st 09 07:34 PM
Sorting Worksheet Tabs Jaqi Excel Worksheet Functions 5 July 15th 08 08:54 PM
Sorting Worksheet Tabs The Rook[_2_] Excel Discussion (Misc queries) 1 October 24th 07 11:12 AM
Sorting a range of worksheet tabs A-Z LaDdIe Excel Worksheet Functions 2 February 18th 07 09:47 AM
sorting tabs Suz Excel Discussion (Misc queries) 1 January 11th 05 06:28 PM


All times are GMT +1. The time now is 04:18 AM.

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

About Us

"It's about Microsoft Excel"