Moving on to the next tab in a macro

  • Thread starter Thread starter Wombat
  • Start date Start date
W

Wombat

Hello!

Is there any way to write into a macro that it should search through several
sheets in a workbook? For eg, loop it to do a search in tab one and then move
on to search tab 2 when its finished?

Thanks for any help
 
code something like this will do it...

dim wks as worksheet

for each wks in worksheets
msgbox wks.name
next wks

Note that we are referencing wks and not the active sheet as the above code
does not activate the sheets. If you are intending to use this with a
recorded amcro then add wks.select to your code.
 
Back
Top