ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro's, Buttons, and 2 Instances (https://www.excelbanter.com/excel-programming/431099-macros-buttons-2-instances.html)

sonicscooter

Macro's, Buttons, and 2 Instances
 
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.

Dave Peterson

Macro's, Buttons, and 2 Instances
 
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.

sonicscooter wrote:

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.


--

Dave Peterson

Peter T

Macro's, Buttons, and 2 Instances
 
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


"sonicscooter" wrote in message
...
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.




sonicscooter

Macro's, Buttons, and 2 Instances
 
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.

"sonicscooter" wrote:

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.



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

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