Hi I have this simple code that follows a hyperlink, and I am trying to assign it to a button but I get
Reference must be to a macro sheet
error. In the module there are no references to any sheets as this is just a simple command opening up IE via cmd. What am I doing wrong?
Sub CAV2()
'For MAGCRD1 (link is for illustration)
Shell "CMD.EXE /C START """" """ & "www.google.com" & """"
End Sub
CAV2 is legal sheet's cell reference. Choose another name for procedure.
the name of the subprocedure (CAV2) is not permitted by VBA. The number "2" is the culprit, change it and everything will work fine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With