View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
capt capt is offline
external usenet poster
 
Posts: 67
Default 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