Visible Button If.....

  • Thread starter Thread starter Wayne
  • Start date Start date
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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top