I have a macro called "UpdateAllPayouts" that lives in a workbook whose name is stored in the variable sPCFactorsWB. The following partial code is from a Private Sub in ThisWorkbook. When I run the code I get error:1004, the macro "Workbook.xls!UpdateAllPayouts" cannot be found. The macro UpdateAllPayouts is a Public sub.
Workbooks(sPCFactorsWB).Activate
Application.Run (sPCFactorsWB & "!UpdateAllPayouts")
What are the conditions under which Application.Run will work?
Workbooks(sPCFactorsWB).Activate
Application.Run (sPCFactorsWB & "!UpdateAllPayouts")
What are the conditions under which Application.Run will work?