Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Auto Close module Kevin Excel Discussion (Misc queries) 1 January 10th 08 11:24 PM
Excel 2007 Close problem Duane Nutley Excel Discussion (Misc queries) 4 October 4th 07 12:58 AM
fix for open/close files problem Patricia Shannon Excel Discussion (Misc queries) 0 April 25th 06 04:21 PM
fix for open/close files problem Patricia Shannon New Users to Excel 0 April 25th 06 04:21 PM
Addin Close problem S G Booth Excel Programming 1 February 13th 05 03:05 PM


All times are GMT +1. The time now is 07:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"