Discussion Locked

Macro Help

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a excel(excel 2000) file that has 26 tabs(worksheets) that has information that I need to bring over to a template(another workbook). I have code that can only pull data out of one tab only. I am having problems looping the code so I can copy the remaining tabs(remaining 25) over to the template(another workbook). Any sort of help would be greatly appreciated. Thank you

Markus

1 reply

by dklippert

Here are a couple of snippets:

Dim WS As Worksheet

For Each WS In Workbooks("Book1.xls").Worksheets
****insert code****
Next

______________________
Dim sht As Worksheet
For Each sht In ThisWorkbook.Worksheets
MsgBox sht.Name
Next sht

This discussion is closed to new replies.