M
me
Hi, I am having problems with custom commandbars. In the Open event I create
a custom cb. I delete it in the BeforeClose event. If I open a second file
that has the same code before closing the first, they collide and the 2nd
one isn't created. If I then close the first, the cb is deleted so I have to
reopen the 2nd or run the code manually to create it. If I remove the code
to delete the cb beforeclose, only the first one created stays open and any
commands run run on the FIRST instance opened, even if it has been closed.
Do I have to create the cb with a unique name, such as the name of the file,
to avoid this? I'm creating many files from a single file with the code. Do
I need to implement the code in a template, or something else?
Many thanks,
Mike
a custom cb. I delete it in the BeforeClose event. If I open a second file
that has the same code before closing the first, they collide and the 2nd
one isn't created. If I then close the first, the cb is deleted so I have to
reopen the 2nd or run the code manually to create it. If I remove the code
to delete the cb beforeclose, only the first one created stays open and any
commands run run on the FIRST instance opened, even if it has been closed.
Do I have to create the cb with a unique name, such as the name of the file,
to avoid this? I'm creating many files from a single file with the code. Do
I need to implement the code in a template, or something else?
Many thanks,
Mike