View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Tab Names in Macro

If you're really updating all the worksheets in a workbook, you can loop through
them without knowing their names.

dim Wks as worksheet
for each wks in activeworkbook.worksheets
'code to do the work against wks here
next wks



Cheri wrote:

I have a macro set up that selects each worksheet and transfers data to each
one. The macro selects the worksheet by name, so if I change a worksheet
name, the macro will not run.

I don't know much about arrays or dim'ing but I know this can be done.

What I would really, really like is a macro to name all worksheets from a
list on one worksheet. Then I would like to run another macro to transfer
the data to each sheet no matter what the sheet tab is named.

I hope I made this clear enough!

Thanks,
Cheri


--

Dave Peterson