ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reference must be to a macro sheet? (https://www.excelbanter.com/excel-programming/448460-reference-must-macro-sheet.html)

Robert Crandal[_2_]

Reference must be to a macro sheet?
 
I made a few copies of Sheet1 by right-clicking the tab and
choosing "Move or Copy", followed by "Create a copy".

Next, I added one one Button control on each sheet.
When I try to assign an existing sub procedure to some
of the buttons I get the following error message:

"Reference must be to a macro sheet"

Does anybody know why this error message is
occurring and how to fix it?

Thanks!



GS[_2_]

Reference must be to a macro sheet?
 
I made a few copies of Sheet1 by right-clicking the tab and
choosing "Move or Copy", followed by "Create a copy".

Next, I added one one Button control on each sheet.
When I try to assign an existing sub procedure to some
of the buttons I get the following error message:

"Reference must be to a macro sheet"

Does anybody know why this error message is
occurring and how to fix it?

Thanks!


Assigned macros should be stored in a standard module, IMO.
Button_Click event code should be stored in the code window of the
sheet the button resides on.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




All times are GMT +1. The time now is 04:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com