That doesn't appear to run. It's just runs as normal.VBA Code:Private Sub UserForm_Activate() If Range("M29").Value <> "" Then CommandButton1.Enabled = False Else CommandButton1.Enabled = True End If End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("M29") <> "" Then
Buttons("Button 12").Visible = False
ElseIf Range("M29") = "" Then
Buttons("Button 12").Visible = True
End If
End Sub
Sub Button1_Click()
'Put this code above your original code
If Range("M29") <> "" Then Exit Sub
'Your original code goes here
End Sub
Yep, that works, thank youNot sure how to disable it but as a workaround, In the macro assigned to that button you can skip the code
VBA Code:Sub Button1_Click() 'Put this code above your original code If Range("M29") <> "" Then Exit Sub 'Your original code goes here End Sub