Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Excel workbookbeforesave event in vb.net

Posted on 2011-03-08
3
Medium Priority
?
556 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

824 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