Solved

Excel workbookbeforesave event in vb.net

Posted on 2011-03-08
3
530 Views
Last Modified: 2012-05-11
from vb.net, When I close an excel , WorkbookBeforeClose event gets fired and then , Dialog box gets appeared with a question as Do you want to save the changes to 'Book1'? and  with Yes, no Cancel buttons.

On Yes press, I want to fire workbookBeforeSave event from vb.net. How do I do that??

Please, help me out.

0
Comment
Question by:gopalhazel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
kdwood earned 500 total points
ID: 35069184
Greetings gopalhazel,

Please take a look at the following Microsoft link.   Once you get into it, post your code if you get stuck and I'm sure we can help.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q302814

Regards,

Keith
0
 

Author Comment

by:gopalhazel
ID: 35091854
Dear Keith,

on closing excel, cursor goes to the event named workbook beforeclose.

afterwhich excel askes a question as "do you want to save changes in 'Book1'", with buttons yes,no and cancel.

my problem is, on yes press, cursor should goto workbookbeforesave event, but that is not happening.

so my question is how to control on when user presses on Yes button to save the Book1 and then i want to divert my control to workbookbeforesave event.
As in my case cursor properly goes to workbookbeforeclose event but after pressing yes to save the 'Book1' cursor does not go 'workbookbeforesave event and it directly throws save dialogbox.

Please help me out, its urgent.



0
 
LVL 10

Expert Comment

by:kdwood
ID: 35110886

Please post your code, so we can try to help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question