R
Randy Numbers
I'm trying to affect several worksheets from a single macro. The WITH
Worksheet("Xyz") command, and following code, seems to work OK when the
macro is invoked when sheet "Xyz" is active, but doesn't hit XYZ if called
from another sheet. I thought the WITH would make the Active sheet
irrelevant. What don't I get?
Sub testing()
With Worksheets("xyz")
..Range("c4") = "background" <=== this works fine
Cells.Select
Selection.EntireRow.Hidden = False <===this seems to be affecting only
active sheet
Selection.EntireColumn.Hidden = False
End With
End Sub
Thanks../Randy
Worksheet("Xyz") command, and following code, seems to work OK when the
macro is invoked when sheet "Xyz" is active, but doesn't hit XYZ if called
from another sheet. I thought the WITH would make the Active sheet
irrelevant. What don't I get?
Sub testing()
With Worksheets("xyz")
..Range("c4") = "background" <=== this works fine
Cells.Select
Selection.EntireRow.Hidden = False <===this seems to be affecting only
active sheet
Selection.EntireColumn.Hidden = False
End With
End Sub
Thanks../Randy