Results 1 to 3 of 3

Thread: [RESOLVED] EXCEL VBA, Save AS VS Before Save Event

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    Montreal, Canada
    Posts
    152

    Resolved [RESOLVED] EXCEL VBA, Save AS VS Before Save Event

    Hi guys,

    I'm having a little problem here.

    I have a master excel file(file 1) that open another file(file 2).
    File 2 have an before save procedure.
    File 1 modify file 2 and try to save it.

    But File 1 cannot save file 2. I' getting an error, file in use witch is true because file 2 has before save proc that is call when file 1 try to save file 2.

    How can I overcome this???

    Thanks

  2. #2
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: EXCEL VBA, Save AS VS Before Save Event

    Bill
    If you disable Events before saving, the Before Save proc will not be called, just make sure you re-enable afterwards.
    VB Code:
    1. Application.EnableEvents = False
    2. File2.Save
    3. Application.EnableEvents = True
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    Montreal, Canada
    Posts
    152

    Re: EXCEL VBA, Save AS VS Before Save Event

    right on.


    Thanks again Declan

Posting Permissions

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



Click Here to Expand Forum to Full Width