grant martin
grant martin

Reputation: 107

Button calling macro "The macro may not be available in this workbook or all macros may be disabled"

I'm calling a macro with multiple arguments from a button. When clicked, a pop-up stating "The macro may not be available in this workbook or all macros may be disabled" appears. However, macros are indeed on and the macro is in my workbook. Here are some screenshots:

enter image description here

'KrakenBookImproved.xlsm!DoSingleMarketOrder Evaluate("Folio!$A2"), "USD", Evaluate("Folio!$P$2")' Is exactly what is assigned to the button

enter image description here

Here is the macro code and location

Popup Here is the popup when I click the button

I'm assuming my macro call

'KrakenBookImproved.xlsm!DoSingleMarketOrder Evaluate("Folio!$A2"), "USD", Evaluate("Folio!$P$2")'

is syntactically incorrect. What is wrong with it? Thanks in advance.

Upvotes: 0

Views: 3515

Answers (1)

grant martin
grant martin

Reputation: 107

'KrakenBookImproved.xlsm'!'DoSingleMarketOrder Evaluate("Folio!$A2"), "USD", Evaluate("Folio!$P$2")' Gives the intended behavior

@GSerg 's comment helped. The issue is I need separate sets of apostrophes around the filename and the sub-call.

Upvotes: 0

Related Questions