ijourneaux
New Member
- Joined
- Jul 9, 2018
- Messages
- 38
From personal.xlsb, I am trying to create a button in the calling workbook and assign a macro that exists in one of the worksheet in the calling workbook.
All of the combinations I have don't produce a macro that is correctly defined. I thought this was going to work since this is exactly how the macro is listed when you browse the assign macro dialog.
.OnAction = "'" & Workbooks(WorkbookName).Worksheets("CenterLine 2").CodeName & "'" & "!CenterLine2Auto_Button_Click"
I expected this
Sheet4.CenterLine2Auto_Button_Click
but got this
'C:\Users\userid\drive\Documents\Sheet4'!CenterLine2Auto_Button_Click
that doesn't work.
I tried
.OnAction = "'" & WorkbookName & "'" & "!CenterLine2Auto_Button_Click"
whicc gave this
'Process Monitor ver4.xlsm'!CenterLine2Auto_Button_Click
but that did not work either.
All of the combinations I have don't produce a macro that is correctly defined. I thought this was going to work since this is exactly how the macro is listed when you browse the assign macro dialog.
.OnAction = "'" & Workbooks(WorkbookName).Worksheets("CenterLine 2").CodeName & "'" & "!CenterLine2Auto_Button_Click"
I expected this
Sheet4.CenterLine2Auto_Button_Click
but got this
'C:\Users\userid\drive\Documents\Sheet4'!CenterLine2Auto_Button_Click
that doesn't work.
I tried
.OnAction = "'" & WorkbookName & "'" & "!CenterLine2Auto_Button_Click"
whicc gave this
'Process Monitor ver4.xlsm'!CenterLine2Auto_Button_Click
but that did not work either.