WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

BeforeClose Event

 
   Home -> Office -> Printing RSS
Next:  rounding up and down formulas  
Author Message
LeAnn

External


Since: Dec 14, 2006
Posts: 2



(Msg. 1) Posted: Tue Mar 18, 2008 7:11 pm
Post subject: BeforeClose Event
Archived from groups: microsoft>public>excel>printing (more info?)

Hi,

I have Excel 2003. I have disabled the builtin commandbars and created a
custom toolbar when a template opens.

I re-instate the builtin commabars in the BeforeClose event. If a user
clicks Cancel do the "Do you want to save changes......" question, the
builtin menu gets re-instated - not good. I have tried
Application.DisplayAlerts = False but that did not prevent the prompt. I
tried Application.SaveChanges = False and that worked but 2 odd things
occurred: User has to click the application close button twice to close
Excel and when you simply open Excel the formula bar isn't displayed.

How do I trap if the user clicks cancel? Code below.

Thanks
LeAnn


Dim oCB As CommandBar
On Error Resume Next

For Each oCB In Application.CommandBars
oCB.Enabled = True
Next oCB

Application.DisplayFormulaBar = True
Back to top
Login to vote
ctm

External


Since: May 18, 2008
Posts: 2



(Msg. 2) Posted: Sun May 18, 2008 3:05 am
Post subject: Re: BeforeClose Event [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Can you program the BeforeClose event to SAVE first, then the user will Not
be prompted to save the wkbook ?

"LeAnn" <LeAnn DeleteThis @discussions.microsoft.com> wrote in message
news:BD984722-BF9C-4874-A5D2-0DE4625A52C3@microsoft.com...
> Hi,
>
> I have Excel 2003. I have disabled the builtin commandbars and created a
> custom toolbar when a template opens.
>
> I re-instate the builtin commabars in the BeforeClose event. If a user
> clicks Cancel do the "Do you want to save changes......" question, the
> builtin menu gets re-instated - not good. I have tried
> Application.DisplayAlerts = False but that did not prevent the prompt. I
> tried Application.SaveChanges = False and that worked but 2 odd things
> occurred: User has to click the application close button twice to close
> Excel and when you simply open Excel the formula bar isn't displayed.
>
> How do I trap if the user clicks cancel? Code below.
>
> Thanks
> LeAnn
>
>
> Dim oCB As CommandBar
> On Error Resume Next
>
> For Each oCB In Application.CommandBars
> oCB.Enabled = True
> Next oCB
>
> Application.DisplayFormulaBar = True
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Printing All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET