I want to add .onAction with three variables to a button on an Excel sheet.
I followed Excel, VBA: How to pass multiple variables to .OnAction to pass multiple variables.
When I click the button, it is throwing an error
"Cannot Run the Macro "Deck v.1'!'Stop_SAP "10.x.x.x", sidadm, " ". The macro may not be available in this workbook or all macros has been disabled.
If I don't pass any variables it is working.
.OnAction = "Stop_SAP"
With btn1
.TextFrame.Characters.Font.Size = 8
.TextFrame.Characters.Caption = "Stop SAP"
.OnAction = "'Stop_SAP """ & hstname & """ ,""" & usrname & """,""" & pass & """'"
.Line.visible = False
End With