Solved

Excel workbookbeforesave event in vb.net

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

813 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

11 Experts available now in Live!

Get 1:1 Help Now