Hi all,
trying to display userform2 located in Book2.xlsm from a command button located in Book1.xlsm
here is my code:
Book2 code...
Sub Z()
userform 2.show
End sub
Book1 code...
Sub commandbutton1_click()
Application.Run "'Book2.xlsm'!Z"
end sub
both workbooks are open.
I get a Run Time Error '1004': Cannot run the macro "'Book2.xlsm'!Z". the macro may not be available in this workbook or all macros are disabled.
I've done some searching online and cannot understand why i am getting the error.
I'm wondering if it has something to do with the .xlsm extension
Thanks.
trying to display userform2 located in Book2.xlsm from a command button located in Book1.xlsm
here is my code:
Book2 code...
Sub Z()
userform 2.show
End sub
Book1 code...
Sub commandbutton1_click()
Application.Run "'Book2.xlsm'!Z"
end sub
both workbooks are open.
I get a Run Time Error '1004': Cannot run the macro "'Book2.xlsm'!Z". the macro may not be available in this workbook or all macros are disabled.
I've done some searching online and cannot understand why i am getting the error.
I'm wondering if it has something to do with the .xlsm extension
Thanks.