PC Review


Reply
Thread Tools Rate Thread

Assigning Macro to a button in a macro

 
 
Wild Jim
Guest
Posts: n/a
 
      12th Nov 2006
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 here:

K:\coding\subs.xls

the master is on K:\monitoring\master.xls

Any helpon this would be appreciated.

Thanks in advance.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning a macro to a button hberg Microsoft Excel Worksheet Functions 1 27th Jan 2010 10:31 PM
Assigning macro to button Zak Microsoft Excel Programming 11 13th Jan 2008 08:15 PM
Assigning a macro to a button outback Microsoft Excel Discussion 5 26th Sep 2007 09:42 PM
Assigning a macro to a button =?Utf-8?B?TmlnZWwgRHJpbmt3YXRlcg==?= Microsoft Excel Programming 3 3rd Apr 2006 01:00 PM
Assigning a macro to a button Junkyard Engineer Microsoft Excel Programming 3 9th Jun 2005 02:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:01 PM.