View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default make button invisible


Right click the sheet tab; and view Code..Paste the below code and try. I
have named the button as CommandButton1. Change to suit..

Private Sub Worksheet_Calculate()
Application.EnableEvents = False
If Range("E49") = 37 Then
Me.CommandButton1.Visible = True
Else
Me.CommandButton1.Visible = False
End If
Application.EnableEvents = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"KateB" wrote:

Hi, please excuse my lack of knowledge around this, but if anyone can help it
will really be appreciated.

I have a button on a worksheet that when 'pressed' will e-mail the content
of certain cells to me. This works really well! (I found the instructions
via a link in another thread!) However, I don't want this button to be
visible unless cell E49 has a value of 37 (it is the sum of other cells).
The worksheet is called Waste quiz. Can anyone help? I know there is a
difference between command buttons and form buttons - I believe this is a
form button.

Any help is gratefully received.

Regards,
Kate