Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
before close problem
Hi all,
I have an application that has a before close function that deletes the menu bar which was created upon opening the file. I have a function that opening an ealier version (ie two of the same files open - different versions), updates certain things, then closes, except that it deletes the menu bar(within the before close), which I do want to happen. Is there any way of skipping this function or certain parts of the function on closing the ealier version, as the new version will still be open and the menu bar still required. Within the update macro I could insert the create the menu bar coding, but lengthy. Any help would be much appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
before close problem
you could try disabling events when you close the earlier version
Application.EnableEvents = False <close your workbook Application.EnableEvents = True "Ashman" wrote: Hi all, I have an application that has a before close function that deletes the menu bar which was created upon opening the file. I have a function that opening an ealier version (ie two of the same files open - different versions), updates certain things, then closes, except that it deletes the menu bar(within the before close), which I do want to happen. Is there any way of skipping this function or certain parts of the function on closing the ealier version, as the new version will still be open and the menu bar still required. Within the update macro I could insert the create the menu bar coding, but lengthy. Any help would be much appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
before close problem
Many thanks JMB, worked perfectly. It is nice to know other people are happy
to share their knowledge. Ashamn "JMB" wrote: you could try disabling events when you close the earlier version Application.EnableEvents = False <close your workbook Application.EnableEvents = True "Ashman" wrote: Hi all, I have an application that has a before close function that deletes the menu bar which was created upon opening the file. I have a function that opening an ealier version (ie two of the same files open - different versions), updates certain things, then closes, except that it deletes the menu bar(within the before close), which I do want to happen. Is there any way of skipping this function or certain parts of the function on closing the ealier version, as the new version will still be open and the menu bar still required. Within the update macro I could insert the create the menu bar coding, but lengthy. Any help would be much appreciated. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
before close problem
You're welcome. But it's not so much my own knowledge that I'm sharing as it
is what I've learned (or stolen) from others <g "Plagiarism Cuts Overhead" "Ashman" wrote: Many thanks JMB, worked perfectly. It is nice to know other people are happy to share their knowledge. Ashamn "JMB" wrote: you could try disabling events when you close the earlier version Application.EnableEvents = False <close your workbook Application.EnableEvents = True "Ashman" wrote: Hi all, I have an application that has a before close function that deletes the menu bar which was created upon opening the file. I have a function that opening an ealier version (ie two of the same files open - different versions), updates certain things, then closes, except that it deletes the menu bar(within the before close), which I do want to happen. Is there any way of skipping this function or certain parts of the function on closing the ealier version, as the new version will still be open and the menu bar still required. Within the update macro I could insert the create the menu bar coding, but lengthy. Any help would be much appreciated. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
before close problem
Ashman
I create and destroy toolbars in the Workbook_Activate and _Deactive events, respectively, rather than the Open and BeforeClose events. It's a little more overhead, but you can be assured that the menu will be there when you want it. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com Ashman wrote: Hi all, I have an application that has a before close function that deletes the menu bar which was created upon opening the file. I have a function that opening an ealier version (ie two of the same files open - different versions), updates certain things, then closes, except that it deletes the menu bar(within the before close), which I do want to happen. Is there any way of skipping this function or certain parts of the function on closing the ealier version, as the new version will still be open and the menu bar still required. Within the update macro I could insert the create the menu bar coding, but lengthy. Any help would be much appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with Auto Close module | Excel Discussion (Misc queries) | |||
Excel 2007 Close problem | Excel Discussion (Misc queries) | |||
fix for open/close files problem | Excel Discussion (Misc queries) | |||
fix for open/close files problem | New Users to Excel | |||
Addin Close problem | Excel Programming |