+ Reply to Thread
Results 1 to 4 of 4

Private sub workbook_open code running workbook_open code from other project

  1. #1
    Registered User
    Join Date
    06-16-2013
    Location
    barry
    MS-Off Ver
    Excel 2010
    Posts
    7

    Private sub workbook_open code running workbook_open code from other project

    HI,

    I have 2 workbooks.

    The 1st book has:
    Private sub workbook_open ()
    code to open userform
    end sub


    The 2nd book has:
    Private sub workbook_open ()
    code to fill some cells and open workbook
    end sub

    When I open the 1st workbook the 2nd workbook_open code is run. Does anybody know why this could happen. Thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Private sub workbook_open code running workbook_open code from other project

    I would suggest that you post samples of the workbooks. It's difficult, at least for me, to try to understand what might be going on without the full picture.

    Presumably, the first workbook opens the second workbook? In which case you would expect the second workbook's open event to fire.

    Regards, TMS
    Last edited by TMS; 06-20-2013 at 06:08 PM. Reason: fix typo
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-16-2013
    Location
    barry
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Private sub workbook_open code running workbook_open code from other project

    Of Course Shuckz. thx.
    Yes the first book opens the 2nd to populate comboboxes. Any idea how I can avoid the other workbook_open() routine in this single instance.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Private sub workbook_open code running workbook_open code from other project

    Use something like:

    Please Login or Register  to view this content.

    Regards, TMS

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1