Visible Button If.....

W

Wayne

I've inserted a button (forms>button) on to one work
sheet of many sheets and want to make the button visible
if one range name ="xxxx" and another range name ="yyyy"
is this possible and if so how is it done?
 
J

JE McGimpsey

One way:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(.Cells, Range("A1,J1")) Is Nothing Then
Me.Buttons("Button 1").Visible = _
Range("A1").Value = "xxxx" And Range("J1").Value = "yyyy"
End If
End With
End Sub
 
Top