Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default Moving on to the next tab in a macro

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Moving on to the next tab in a macro

A looping macro for each sheet to search and end the macro when found.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Wombat" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Moving on to the next tab in a macro

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.
--
HTH...

Jim Thomlinson


"Wombat" wrote:

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

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
Moving the second row with a macro Max2073 Excel Worksheet Functions 1 October 3rd 09 04:02 PM
Moving macro from one PC to another ChuckW Excel Discussion (Misc queries) 1 May 8th 07 02:45 PM
moving macro SherryJ Excel Worksheet Functions 2 March 28th 07 02:50 AM
Moving a macro to other PCs ChuckW Excel Discussion (Misc queries) 7 February 13th 07 08:18 PM
Moving right in a macro BJS Excel Discussion (Misc queries) 2 August 27th 05 01:54 AM


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