Good day everybody.
I'm now doing some basic coding for excel.
Would like to find out how do you make a command button hidden on the first sheet and appear at the second sheet?
For example, the first sheet will only have a "Additional Page" command button and when u press that, the second sheet will appear. But instead of only "Additional page" button on the second sheet, there will be "Delete this page" command button appearing as well.
So in short, what code do i use to make it hidden at the first sheet but appear at the second sheet and so on?
My current code is this:
[VBA]Sub Additionalpagedelete()
Application.Screenupdating = False
Application.DisplayAlerts = False
On Error Resume Next
Activeworkbook.Unprotect = "1"
Activesheet.Unprotect = "1"
Activesheet.Delete
Activeworkbook.protect "1", Structure:=True, Windows:=False
'Activesheet.Protect "1", Drawingobjects:=True, Contents:=True, Scenarios: _
True
End Sub[/VBA]
This code works fine.