LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default select sheets

The magic is not knowing what TRUE/FALSE does as an argument to the Select
method, but it is the elegant way of not having to set up if ... else ....
end if clause to separate treatment. I am going to be on the lookout for
opportunities to do that when an T/F argument varies under two mutually
exclusive conditions like shown ... i.e., something either IS or IS NOT =
Mylimit.

Beautiful.



"snax500" wrote in message
oups.com...
It really is. I wrote to Dave for an explanation. Here it is...



Take a look at help for .select.

It has an option to replace the selected sheet or keep adding.

False means that it's just "added" to the current group of selected
sheets.

True means to select that sheet and "unselect" the previous sheets.

I want True only on the first worksheet in that group--when (ictr =
mylimit
+ 1)

mylimit = 2

Then ictr = 3 (the first of the group).

The next time through, ictr will be 4
4 is different from mylimit + 1 (=3) so it evaluates to False--and so
that
second (and all subsequent sheets get added to the group.


Thanks again Dave.



 
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
macro to select all sheets belvy123 Excel Discussion (Misc queries) 1 March 26th 08 04:23 PM
How to select other sheets using ADO farmer[_2_] Excel Programming 2 October 24th 04 06:56 PM
select a1 on all sheets Piers Clinton-Tarestad Excel Programming 1 October 1st 03 08:34 PM
All Sheets Unhide and Select Hande & Tolga Excel Programming 2 September 11th 03 02:16 PM
select sheets by name - how? Walt[_2_] Excel Programming 5 July 30th 03 10:42 PM


All times are GMT +1. The time now is 07:28 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"