LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Detecting Selected WorkSheet

VBA doesn't really support what you describe. Some of this functionality
can be achieved by using the selection object, but it is more robust to loop
through the sheets and make the change on each sheet

for each sh in ActiveWindow.Selectedsheets
' add code to do the work such as:
sh.Range("A1").Interior.ColorIndex = 3
Next

--
Regards,
Tom Ogilvy

"LeoNgan" wrote in message
...
No .. you mis-understand my meaning ..

in Excel you can select multiple worksheet by click the tab with shift
button (Sheet1, Sheet2, Sheet3, etc) and then apply function on them.

Now I would like to write a macro, which effect to the user's selected
worksheet. It is a dynamical situation.

Got it ??

:)



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



 
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
Blocking/Disabling selected worksheet DJ Ghale Excel Worksheet Functions 1 September 16th 08 01:19 AM
Detecting Duplicate Sums - Worksheet code [email protected] Excel Discussion (Misc queries) 0 September 27th 07 02:20 AM
Hiding worksheet unless selected SAP PoD Excel Discussion (Misc queries) 2 August 18th 06 03:45 PM
How to run a macro when a worksheet is selected cpmittal Excel Worksheet Functions 2 July 27th 05 11:57 AM
Detecting Worksheet change Tim[_14_] Excel Programming 2 July 10th 03 01:47 PM


All times are GMT +1. The time now is 06:05 PM.

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"