AndrewGKenneth
Board Regular
- Joined
- Aug 6, 2018
- Messages
- 59
Hi there,
I am having some trouble getting my code to work. I would like commandbutton1 in sheet1 to hide so it is not visible when the form is printed by the user. Could someone please help me to identify where I am going wrong with my code? I have posted it below.
Private Sub Workbook_BeforePrint (Cancel As Boolean)
Sheets("Sheet1").Commandbutton1.Visible = False
End Sub
Thanks in advance
I am having some trouble getting my code to work. I would like commandbutton1 in sheet1 to hide so it is not visible when the form is printed by the user. Could someone please help me to identify where I am going wrong with my code? I have posted it below.
Private Sub Workbook_BeforePrint (Cancel As Boolean)
Sheets("Sheet1").Commandbutton1.Visible = False
End Sub
Thanks in advance
Last edited: