Hide commandbutton?

C

capt

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.
 
W

WLMPilot

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top