Applying to just selected sheets

R

Roddie

I'm familiar with

For Each w In Worksheets
...do something...
Next w

but want to apply a macro to just the selected sheets. Could someone point
me in the right direction.

Thanks

Roddie Grant
 
J

JE McGimpsey

Roddie said:
I'm familiar with

For Each w In Worksheets
...do something...
Next w

but want to apply a macro to just the selected sheets. Could someone point
me in the right direction.

One way:

Dim w As Worksheet
For Each w In ActiveWindow.SelectedSheets
'...do something...
Next w
 

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