Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default how do you hide a forms command button

I need to be able to hide and display a command button depending on the
occurrence of certain events. What code can I use to hide and display a
command button named "cmdEnterData"?

Thank you in advance.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default how do you hide a forms command button

This is from the Forms toolbar?

Worksheets("Sheet1").Buttons("cmdEnterData").Visib le = True

There's another property that you might like, too: .enabled = True/False

The button will still be there, but won't do anything if you click it.

Paul James wrote:

I need to be able to hide and display a command button depending on the
occurrence of certain events. What code can I use to hide and display a
command button named "cmdEnterData"?

Thank you in advance.


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default how do you hide a forms command button

sorry, missed the button is on the worksheet and not a
userform...




-----Original Message-----
This is from the Forms toolbar?

Worksheets("Sheet1").Buttons("cmdEnterData").Visi ble =

True

There's another property that you might like,

too: .enabled = True/False

The button will still be there, but won't do anything if

you click it.

Paul James wrote:

I need to be able to hide and display a command button

depending on the
occurrence of certain events. What code can I use to

hide and display a
command button named "cmdEnterData"?

Thank you in advance.


--

Dave Peterson

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default how do you hide a forms command button


If ??? True Then
cmdEnterData.Visible = True
Else
cmdEnterData.Visible = False
End If


Hope this helps...

-----Original Message-----
I need to be able to hide and display a command button

depending on the
occurrence of certain events. What code can I use to

hide and display a
command button named "cmdEnterData"?

Thank you in advance.


.

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
Forms Command Button - Removal JMay Excel Discussion (Misc queries) 8 January 4th 07 06:33 PM
Use of Forms Command-button on Worksheet Jim May Excel Discussion (Misc queries) 12 November 13th 06 06:08 PM
Command button on forms Erik (AP Inc.) Excel Discussion (Misc queries) 2 August 28th 06 01:58 PM
Command Button to Hide/Unhide Rows Bea Excel Discussion (Misc queries) 4 March 16th 06 03:21 PM
Hide command button on worksheet Mohair Excel Programming 3 July 14th 03 11:06 PM


All times are GMT +1. The time now is 11:24 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"