Running a macro on multiple tabs

K

kevin

Hi

I have put together a macro that formats my data but i need help with the code that makes it cycle through the tabs and applies it to each tab. is that a loop function or a sheetoffset or what.

Many thank
 
B

Bob Phillips

Hi Kevin,

It is a loop

For Each sh In ActiveWorkbook.Worksheets
' do your thing
' qualify objects with sh.
; e.g. If sh.Range("A1") = "Hello"
Next sh

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

kevin said:
Hi,

I have put together a macro that formats my data but i need help with the
code that makes it cycle through the tabs and applies it to each tab. is
that a loop function or a sheetoffset or what.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top