Solved

Excel workbookbeforesave event in vb.net

Posted on 2011-03-08
3
507 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now