heyitslujan
New Member
- Joined
- Jul 29, 2015
- Messages
- 7
Hi All,
Thanks for checking out my question. I've been asked to create a button that only appears based on 3 of 4 values available from a dropdown box(K6). The values are "REMOVE", "ADD ON" and "REPLACE EXISTING". Here's what I have so far. I can get it to work for one value like, "REMOVE", but do not know how to write this to work for all 3 approved values.
Private Sub Worksheet_Change(ByVal Target As Range)
'ActiveX button
If Range("K6").Value = "ADD ON" Then
ActiveSheet.CommandButton1.Visible = True
Else
ActiveSheet.CommandButton1.Visible = False
End If
End Sub
Thanks for checking out my question. I've been asked to create a button that only appears based on 3 of 4 values available from a dropdown box(K6). The values are "REMOVE", "ADD ON" and "REPLACE EXISTING". Here's what I have so far. I can get it to work for one value like, "REMOVE", but do not know how to write this to work for all 3 approved values.
Private Sub Worksheet_Change(ByVal Target As Range)
'ActiveX button
If Range("K6").Value = "ADD ON" Then
ActiveSheet.CommandButton1.Visible = True
Else
ActiveSheet.CommandButton1.Visible = False
End If
End Sub