View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] adambush4242@hotmail.com is offline
external usenet poster
 
Posts: 168
Default Hide Buttons When a Cell is False

Rick,

Great! Thanks for your help. I appreciate the speedy response.

Thanks

Adam Bush

"Rick Rothstein (MVP - VB)" wrote:

Assuming for this example that the cell you want to monitor is A1, this
Worksheet Change event code should do what you want; it makes the
CommandButton (what you are using, right?) visible if and only if the value
in the cell is TRUE...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("A1") Then CommandButton1.Visible = Target.Value = "True"
End Sub

This version makes the CommandButton visible is the cell contains **any**
entry...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("A1") Then CommandButton1.Visible = Target.Value < ""
End Sub

Rick


"
m wrote in message
...
Is there a way to hide and unhide buttons when a cell is true/false? I
use
this all the time for regular formulas within excel, but am not sure if it
is
possible to hide actual buttons. Any help would be greatly apreciated.

Thanks

Adam Bush