Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default WORKSHEET SORTING NOT WORKING?

From the archives I was directed to:

http://www.cpearson.com/excel/sortws.aspx

I entered the entire 4 pieces of code:
1. SortWorksheetsByName;
2. SortWorksheetsByNameArray;
3. GroupSheetsByColor; and
4. Supportive code;

in a single module by:

1. Alt+F11;
2. InsertModule;
3. Copying & pasting all the 4 parts;

Now I entered in one worksheet:
=SortWorksheetsByName(0,0,"NO")

The formula/function returns TRUE however how 2 make it work and do the
sorting of the worksheets???
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default WORKSHEET SORTING NOT WORKING?

This function was not meant to be called from a cell on a worksheet.

It was meant to be called from a different subroutine.

FARAZ QURESHI wrote:

From the archives I was directed to:

http://www.cpearson.com/excel/sortws.aspx

I entered the entire 4 pieces of code:
1. SortWorksheetsByName;
2. SortWorksheetsByNameArray;
3. GroupSheetsByColor; and
4. Supportive code;

in a single module by:

1. Alt+F11;
2. InsertModule;
3. Copying & pasting all the 4 parts;

Now I entered in one worksheet:
=SortWorksheetsByName(0,0,"NO")

The formula/function returns TRUE however how 2 make it work and do the
sorting of the worksheets???


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default WORKSHEET SORTING NOT WORKING?

Sorry I couldn't understand how and from where to be called.

Would you kindly elaborate the same as a display?

"Dave Peterson" wrote:

This function was not meant to be called from a cell on a worksheet.

It was meant to be called from a different subroutine.

FARAZ QURESHI wrote:

From the archives I was directed to:

http://www.cpearson.com/excel/sortws.aspx

I entered the entire 4 pieces of code:
1. SortWorksheetsByName;
2. SortWorksheetsByNameArray;
3. GroupSheetsByColor; and
4. Supportive code;

in a single module by:

1. Alt+F11;
2. InsertModule;
3. Copying & pasting all the 4 parts;

Now I entered in one worksheet:
=SortWorksheetsByName(0,0,"NO")

The formula/function returns TRUE however how 2 make it work and do the
sorting of the worksheets???


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default WORKSHEET SORTING NOT WORKING?

The function is to be called from a subroutine or another function in your
code--not put in a formula in a cell.

FARAZ QURESHI wrote:

Sorry I couldn't understand how and from where to be called.

Would you kindly elaborate the same as a display?

"Dave Peterson" wrote:

This function was not meant to be called from a cell on a worksheet.

It was meant to be called from a different subroutine.

FARAZ QURESHI wrote:

From the archives I was directed to:

http://www.cpearson.com/excel/sortws.aspx

I entered the entire 4 pieces of code:
1. SortWorksheetsByName;
2. SortWorksheetsByNameArray;
3. GroupSheetsByColor; and
4. Supportive code;

in a single module by:

1. Alt+F11;
2. InsertModule;
3. Copying & pasting all the 4 parts;

Now I entered in one worksheet:
=SortWorksheetsByName(0,0,"NO")

The formula/function returns TRUE however how 2 make it work and do the
sorting of the worksheets???


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default WORKSHEET SORTING NOT WORKING?

Sorry still unclear despite of all my exercise during the whole night,

Kindly suppose,

I want to create 3 macros with shortcut key for all such three sorting
methods and add it in my MasterAddin.xla

What & How to do so?

"Dave Peterson" wrote:

The function is to be called from a subroutine or another function in your
code--not put in a formula in a cell.

FARAZ QURESHI wrote:

Sorry I couldn't understand how and from where to be called.

Would you kindly elaborate the same as a display?

"Dave Peterson" wrote:

This function was not meant to be called from a cell on a worksheet.

It was meant to be called from a different subroutine.

FARAZ QURESHI wrote:

From the archives I was directed to:

http://www.cpearson.com/excel/sortws.aspx

I entered the entire 4 pieces of code:
1. SortWorksheetsByName;
2. SortWorksheetsByNameArray;
3. GroupSheetsByColor; and
4. Supportive code;

in a single module by:

1. Alt+F11;
2. InsertModule;
3. Copying & pasting all the 4 parts;

Now I entered in one worksheet:
=SortWorksheetsByName(0,0,"NO")

The formula/function returns TRUE however how 2 make it work and do the
sorting of the worksheets???

--

Dave Peterson


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default WORKSHEET SORTING NOT WORKING?

Don't put the function in a formula in a worksheet.

Create a subroutine that calls the function, then use tools|macro|macros to run
that subroutine.

FARAZ QURESHI wrote:

Sorry still unclear despite of all my exercise during the whole night,

Kindly suppose,

I want to create 3 macros with shortcut key for all such three sorting
methods and add it in my MasterAddin.xla

What & How to do so?

"Dave Peterson" wrote:

The function is to be called from a subroutine or another function in your
code--not put in a formula in a cell.

FARAZ QURESHI wrote:

Sorry I couldn't understand how and from where to be called.

Would you kindly elaborate the same as a display?

"Dave Peterson" wrote:

This function was not meant to be called from a cell on a worksheet.

It was meant to be called from a different subroutine.

FARAZ QURESHI wrote:

From the archives I was directed to:

http://www.cpearson.com/excel/sortws.aspx

I entered the entire 4 pieces of code:
1. SortWorksheetsByName;
2. SortWorksheetsByNameArray;
3. GroupSheetsByColor; and
4. Supportive code;

in a single module by:

1. Alt+F11;
2. InsertModule;
3. Copying & pasting all the 4 parts;

Now I entered in one worksheet:
=SortWorksheetsByName(0,0,"NO")

The formula/function returns TRUE however how 2 make it work and do the
sorting of the worksheets???

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
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
working VAT in worksheet Tina Harrison Excel Worksheet Functions 16 August 8th 07 08:44 PM
working VAT in worksheet Tina Harrison Excel Worksheet Functions 0 August 8th 07 07:22 PM
Copied worksheet not working [email protected] Excel Discussion (Misc queries) 0 June 15th 06 08:01 PM
Date sorting not working? sarjak Excel Discussion (Misc queries) 5 December 28th 05 08:40 PM
Working in a Worksheet that has protection on Melanie Ferguson Excel Worksheet Functions 0 October 4th 05 02:58 PM


All times are GMT +1. The time now is 08:15 AM.

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

About Us

"It's about Microsoft Excel"