Private Sub CommandButton1_Click()
'Unhide the active sheet and
'Goto to 'Sheet1'
With ActiveWorkbook.Worksheets("Sheet2")
.Visible = True
' Unhide ActiveSheet If Not 'Sheet1'
If .Name <> ActiveSheet.Name Then
End If
Application.Goto _
Reference:=.Range("A1"), _
Scroll:=True
End With
End Sub
Private Sub CommandButton1_Click()
'hide the active sheet and
'return back to 'sheet1'
With ActiveWorkbook.Worksheets("Sheet1")
.Visible = True
' Hide ActiveSheet If Not 'Sheet1'
If .Name <> ActiveSheet.Name Then
ActiveSheet.Visible = False
End If
Application.Goto _
Reference:=.Range("A1"), _
Scroll:=True
End With
End Sub
@majedix
Welcome to Chandoo.org forum, Glad You Are here
please elaborate some more details what do you want
Private Sub CommandButton1_Click()
'Unhide the active sheet and'Goto to 'Sheet1'With ActiveWorkbook.Worksheets("Sheet2") ' Replace the Sheet name as your
.Visible = True
' Unhide ActiveSheet If Not 'Sheet1'If .Name <> ActiveSheet.Name Then
End If
Application.Goto _
Reference:=.Range("A1"), _
Scroll:=True
End With
End Sub
Private Sub CommandButton1_Click()
'hide the active sheet and'return back to 'sheet1'With ActiveWorkbook.Worksheets("Sheet1") ' Replace the Sheet name as your
.Visible = True
' Hide ActiveSheet If Not 'Sheet1'If .Name <> ActiveSheet.Name Then
ActiveSheet.Visible = False
End If
Application.Goto _
Reference:=.Range("A1"), _
Scroll:=True
End With
End Sub