Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning a macro to a button hberg Excel Worksheet Functions 1 January 27th 10 10:31 PM
Assigning A Macro to A Button Holly Excel Worksheet Functions 1 January 18th 08 10:04 AM
Assigning a macro to a button Nigel Drinkwater Excel Programming 3 April 3rd 06 01:00 PM
assigning a macro to a button Darby Excel Discussion (Misc queries) 2 February 10th 06 05:05 PM
Assigning a macro to a button Junkyard Engineer Excel Programming 3 June 9th 05 02:00 PM


All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"