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
 
Top