Thread
:
Deactivate button macro if condition not met
View Single Post
#
4
Posted to microsoft.public.excel.programming
GBExcel via OfficeKB.com
external usenet poster
Posts: 26
Deactivate button macro if condition not met
Thank you Marcus,
I had to add in an End if, and it works.
If Range("A1").Value = "" Then
'Run your code
Else: MsgBox "Stop! Button may not be used on this page."
Exit Sub
End If
End Sub
--
Message posted via
http://www.officekb.com
Reply With Quote
GBExcel via OfficeKB.com
View Public Profile
Find all posts by GBExcel via OfficeKB.com