![]() |
Hide commandbutton?
I have a commandbutton on my worksheet titled menu. When pressed a userform
appears. How do i get the commandbutton to disappear when the userform appears and reappear when the userform is closed. -- capt |
Hide commandbutton?
Commandbutton#.Visible = False (Hide)
Worksheets("sheetname").Commandbutton#.Visible = True (Display) Change the # to the numeric value of the commandbutton. Place the FALSE code in the routine that is executed when the command button is clicked. It is necessary to address the sheet that the commandbutton is on within the "display" code since you are using a userform. Place this code within the routine that is executed to end the userform, ie FINISNED, END, CANCEL, etc. Les "capt" wrote: I have a commandbutton on my worksheet titled menu. When pressed a userform appears. How do i get the commandbutton to disappear when the userform appears and reappear when the userform is closed. -- capt |
Hide commandbutton?
WLMPilot,
From one Pilot to another!!! Many thanks, it works well. -- capt "WLMPilot" wrote: Commandbutton#.Visible = False (Hide) Worksheets("sheetname").Commandbutton#.Visible = True (Display) Change the # to the numeric value of the commandbutton. Place the FALSE code in the routine that is executed when the command button is clicked. It is necessary to address the sheet that the commandbutton is on within the "display" code since you are using a userform. Place this code within the routine that is executed to end the userform, ie FINISNED, END, CANCEL, etc. Les "capt" wrote: I have a commandbutton on my worksheet titled menu. When pressed a userform appears. How do i get the commandbutton to disappear when the userform appears and reappear when the userform is closed. -- capt |
All times are GMT +1. The time now is 08:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com