Consulting

Results 1 to 5 of 5

Thread: Workbook_BeforeSave

  1. #1

    Question Workbook_BeforeSave

    Workbook_BeforeSave

    Should Workbook_BeforeSave execute when saving directly from email?



    Thanks in advance for all responses.
    Kay

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Hi Kay,

    By "saving directly from email," do you mean opening the attachment to the mail message and doing a SaveAs, or do you mean right-clicking on the attachment in the email and doing a SaveAs without opening it?

    Mark

  3. #3

    WorkBook_BeforeSave

    Mark, Thanks for asking. Let me clarify.
    I mean one of two cases:
    a) Right-clicking to SaveAs without opening, just as you mentioned
    b) Clicking on attachment, and getting three options {Save, Open, Cancel} in the download dialog box and clicking on Save.


    Kay.

    Quote Originally Posted by GTO
    Hi Kay,

    By "saving directly from email," do you mean opening the attachment to the mail message and doing a SaveAs, or do you mean right-clicking on the attachment in the email and doing a SaveAs without opening it?

    Mark

  4. #4
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Quote Originally Posted by ilariak2102
    Mark, Thanks for asking. Let me clarify.
    I mean one of two cases:
    a) Right-clicking to SaveAs without opening, just as you mentioned
    b) Clicking on attachment, and getting three options {Save, Open, Cancel} in the download dialog box and clicking on Save.


    Kay.
    Hi Kay,

    I am at work, so am in 2010 for both Excel and Outlook. BeforeSave did not run when I tested sending myself Excel workbooks in both .xlsm and .xls format. FWIW, I do not see how any of the workbook events could fire when doing a SaveAs on the closed workbook, so no, I don't believe it should.

    In re-reading your first question, I realize that you did not actually say it was/is happening, just that you were wondering if it would. It should not, as the workbook must be opened/loaded into memory, for any of these events to occur. Does that help?

    Mark

  5. #5

    Workbook_BeforeSave

    Mark,
    Thanks a ton for taking the time to reply.

    You are right. I actually tried it and found that the events were not firing. I was wondering whether I was doing something wrong.
    From your response I am concluding that these event will not fire from a closed book.



    Kay


    Quote Originally Posted by GTO
    Hi Kay,

    I am at work, so am in 2010 for both Excel and Outlook. BeforeSave did not run when I tested sending myself Excel workbooks in both .xlsm and .xls format. FWIW, I do not see how any of the workbook events could fire when doing a SaveAs on the closed workbook, so no, I don't believe it should.

    In re-reading your first question, I realize that you did not actually say it was/is happening, just that you were wondering if it would. It should not, as the workbook must be opened/loaded into memory, for any of these events to occur. Does that help?

    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •