I am trying to find a VB function that will allow me to run a macro through
all worksheets in an Excel file? I am using an Excel file with 500
worksheets. What is the VB command that will cycle through all worksheets in
this Excel file?
Thanks!!
I am trying to find a VB function that will allow me to run a macro through
all worksheets in an Excel file? I am using an Excel file with 500
worksheets. What is the VB command that will cycle through all worksheets in
this Excel file?
Thanks!!
Dim WS As Worksheet
For Each WS In ActiveWorkbook.Worksheets
' do your stuff
Next
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
Confused VB Person wrote:
> I am trying to find a VB function that will allow me to run a macro through
> all worksheets in an Excel file? I am using an Excel file with 500
> worksheets. What is the VB command that will cycle through all worksheets in
> this Excel file?
>
> Thanks!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks