Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hi,

    I was asked this question from a client...

    They have a workbook that has a VBA userform that opens when the workbook is opened (the On Open event) (Lets name this workbook "Source")

    In another workbook they are running a macro that needs to access info in the Source workbook. This macro opens Source so it can copy some data in it, but, when Source opens, the userform is loaded as the On Open event fires.

    Question:
    How can I stop the userform from opening automatically when this macro opens Source??? Currently the user has to cancel the userform each time for the macro to continue running?

    TIA
    Regards,
    Rudi

  2. #2
    2 Star Lounger
    Join Date
    Mar 2002
    Location
    Western NY, USA
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts
    put an
    Application.EnableEvents = False
    before the Workbooks.Open statement.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post
    Tx Cecil.

    Its working!

    Cheers
    Regards,
    Rudi

Posting Permissions

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