+ Reply to Thread
Results 1 to 11 of 11

Linking 2 workbooks

  1. #1
    Registered User
    Join Date
    11-14-2011
    Location
    England,North East
    MS-Off Ver
    Excel 2003
    Posts
    67

    Linking 2 workbooks

    Hi,

    I need a macro that will trigger the opening of a 2nd workbook automatically, when a first workbook is opened by the end user. Any help gratefully recieved. I have had one previously but it wasn't opening the 2nd workbook fully so I've ended up scrapping it.
    Last edited by michellecairns; 12-19-2011 at 01:09 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Linking 2 workbooks

    Do you want the user to select the path to the 2nd workbook or do u want to open it automatically?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    11-14-2011
    Location
    England,North East
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Linking 2 workbooks

    Hi Arlu, the less user envolvement the better. I'm really looking for something automatic?

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Linking 2 workbooks

    in the ThisWorkbook module:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-14-2011
    Location
    England,North East
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Linking 2 workbooks

    Hi Kyle,

    I've changed this code to read:

    Please Login or Register  to view this content.
    But it doesn't seem to work. Am I missing something. I do it via Microsoft Visual Basics making sure I change the drop down box to read "this workbook" and save / run but nothing seems to actually save? Any help appreciated.

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Linking 2 workbooks

    hi michelle, this runs when the workbook is opened. So you'll need to save the workbook with the code in and then re-open it

  7. #7
    Registered User
    Join Date
    11-14-2011
    Location
    England,North East
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Linking 2 workbooks

    MyLists.xlsKier Timesheets.xlsHi Kyle,

    Yep, I've tried that a few times but to no avail. I've attached the workbooks in the hope that, that will help.

  8. #8
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Linking 2 workbooks

    Hi Michelle, you've put the code in a module.

    It needs to go in the "ThisWorkbook" module, it's the one at the bottom of the other sheets

  9. #9
    Registered User
    Join Date
    11-14-2011
    Location
    England,North East
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Linking 2 workbooks

    Sorry Kyle, I am a macro idiot and I have no idea what you mean by that. Laymans terms?

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Linking 2 workbooks


  11. #11
    Registered User
    Join Date
    11-14-2011
    Location
    England,North East
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Linking 2 workbooks

    Thank you Kyle, you have made my Christmas! 3 weeks I've being trying to get a macro that works and allows the drop down boxes in the first workbook to continue working properly, I believe that this is macro number 11! I hope you're off to polish that armour.

+ 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