Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning Macro to a button in a macro
Hello all, I have a complicated problem:
I have written some code which creates a workbook (call it "master"). Inside the workbook it creates a button and assigns a macro (called "mon") to it. The macro "mon" is held in another (shared) spreadsheet called "subs". Finally, the macro shares the master spreadsheet. The idea is that many users on the network can use and update the master spreadsheet, (which changes each month) then when they wish, they can press the button to open the "subs" worksheet and run the macro "mon" which manipulates the data in the "master" spreadsheet. The "mon" routine finishes by closing the "subs" worksheet, so no one notices it's ever been opened. By doing it this way, and not having a custom button on everyone's machine, I can be sure they are in the correct spreadsheet and on the right sheet. The problem I am having is that this code works perfectly for me (I recorded the assign macro to button bit on my machine) and for several others, but for some, it will not work; when they press the button they get the error that the spreadsheet "subs" cannot be found. By the way, it IS a FORMS button. When I recorded the macro assigning mon in subs to the button, I had the subs workbook open - I wonder whether this may be my problem (!) but don't know how to assign a macro in another spreadsheet programatically. All users do have access to the shared drive, which is located he K:\coding\subs.xls the master is on K:\monitoring\master.xls Any helpon this would be appreciated. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Assigning a macro to a button | Excel Worksheet Functions | |||
Assigning A Macro to A Button | Excel Worksheet Functions | |||
Assigning a macro to a button | Excel Programming | |||
assigning a macro to a button | Excel Discussion (Misc queries) | |||
Assigning a macro to a button | Excel Programming |