Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Duke Carey
 
Posts: n/a
Default Worksheet Selections in Macros

dim ws as worksheet
for each ws in activeworkbook.worksheets
' you may want to test to see if the worksheet is visible
ws.activate
' put your code here
next ws


"Karen" wrote:

How do you write a VB code to select all worksheets in a file when you don't
know the number of worksheets or the name of the worksheets?

Thanks for any and all help.

Karen

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
Question when Copying an Existing Worksheet LL Excel Worksheet Functions 0 June 13th 05 03:17 PM
allow macros in protected worksheet Marge Excel Worksheet Functions 1 May 25th 05 04:23 PM
Refrencing another cell in a worksheet that "could" exist KimberlyC Excel Worksheet Functions 1 February 7th 05 07:09 PM
Worksheet Navigation sedona123 Excel Discussion (Misc queries) 1 January 21st 05 04:43 PM
copyright and worksheet protection dow Excel Discussion (Misc queries) 2 January 3rd 05 03:07 PM


All times are GMT +1. The time now is 10:13 PM.

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"