#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 470
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i make a commandbutton run a macro?? Shax New Users to Excel 7 June 7th 06 05:16 PM
Floating CommandButton Richard Excel Worksheet Functions 1 April 29th 06 08:34 PM
Tooltip for my CommandButton LQs Excel Discussion (Misc queries) 1 December 2nd 05 09:53 AM
CommandButton - Userform Marcia3641 Excel Discussion (Misc queries) 2 July 21st 05 06:39 PM
Assigning a Hyperlink to a CommandButton Andy T Excel Discussion (Misc queries) 2 December 21st 04 12:31 PM


All times are GMT +1. The time now is 07:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"