Macro's, Buttons, and 2 Instances

S

sonicscooter

Hi, i have had for the last few month two instances of Excel running, with
the same buttons on the excel menu bar appearing on both instances as you
would expect, i asighned a macro to button 1, for the first instanse and it
works, i can't remember how i get the same button with the same macro to work
when i use the second instance, ie the same button doing the same thing in
each instance.

If i asighn a macro to button 1 in each instance when they are both open and
im using them both it works with both instances until i close them down, on
reopening only 1 button will work with 1 instance, if i click the button in
the other instance a box comes up saying that the macro's are not enabled and
refers to the other instances file.

I hope this makes sence, as i have now forgotten comlpetely how to solve
this problem...

Thanks Shane.
 
D

Dave Peterson

I don't use multiple instances of excel very often and I've never seen a message
like you described.

Maybe you could try it again and post the exact message you're getting.

It may help someone help you.
 
P

Peter T

The thing to bear in mind is the toolbar settings are saved when an instance
is closed. I didn't quite follow all but it could indeed be the case a
button points to the wrong place when a new instance is started.

It is probably better to create your macro button when needed, typically
that will be in the open event of the workbook or addin that contains the
linked macro. When the workbook closes it should delete the button. If you
are not sure how to do that post back or better still, search this ng for
many examples.

Regards,
Peter T
 
S

sonicscooter

Hi again, thanks for the replies, i think i used the Personal Macro Workbook,
im going to have a try with that......on a wing and a prayer...Shane.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top