Macros

  • Thread starter Thread starter Sri Harsha
  • Start date Start date
S

Sri Harsha

I have recorded a macro that unhides a sheet from the existing workbook. But
when i run it now, it unhides but remains in the existing sheet. I want it to
take me to the sheet that has been unhidden.

Pls help.
 
Sub qwerty()
Dim s As Worksheet
For Each s In Worksheets
If s.Visible = False Then
s.Visible = True
s.Activate
Else
End If
Next
End Sub
 
Hi

You need to activate the sheet like this once it's unhidden:

Sheets("Sheet1").Acitvate

Hopes this helps
 
Back
Top