+ Reply to Thread
Results 1 to 10 of 10

book2 auto opened once book1 opened

  1. #1
    Forum Contributor
    Join Date
    12-11-2023
    Location
    los altos, ca
    MS-Off Ver
    2016
    Posts
    156

    book2 auto opened once book1 opened

    ******Millions thanks to Genius Bakerman2 for the most powerful, super quick code that works miraculously. Your super quick help is always greatly appreciated. I wish I could add all ** to your rep. God bless you all***



    Thanks millions Bakerman2, MikeVol for your super quick codes. I do not have a chance to test the codes properly but I cant wait any longer to add reps to your super quick code, talent, your passion to help. All stars are banked to your reps as always regardless. I will keep you update for the proper test.
    God bless you all.


    Hi Super coders
    Wishing you a sunny, happy weekend.
    I urgently need your talent please.
    I have 2 books, both are xmls.
    I need VBA code for one of these books that when one book is opened, the other will also be opened.
    both are in different drives? or is it required to be the same?
    Thanks in advance for your help
    Attached Files Attached Files
    Last edited by jojo4santa; 07-06-2025 at 08:13 PM. Reason: Genius Bakerman2 code works like a miracle - closed

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,569

    Re: book2 auto opened once book1 opened

    In ThisWorbook module of Book1.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Valued Forum Contributor MikeVol's Avatar
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    MSO Prof Plus 2021 x64 (En)
    Posts
    577

    Re: book2 auto opened once book1 opened

    Hello @jojo4santa.
    Paste the following code into the ThisWorkbook module of the Book1.xlsm workbook, save and close the file. Open it again and enjoy! In the code, you can specify the path to the Book2.xlsm workbook (read the comments in the code), or you can omit it, then the user will be asked to specify the path to the file. Otherwise, work will continue without the second (Book2.xlsm) file.
    Please Login or Register  to view this content.
    Good luck.
    Last edited by MikeVol; 07-06-2025 at 09:09 AM. Reason: Update
    NOTE: As the original poster/owner, only you can mark your thread as SOLVED (Thread Tools above Post #1).
    You can say "Thanks" in your thread to everyone who offered to help you.
    You can also reward them by clicking * "Add Reputation" under their username on the left.
    With Regards, MikeVol.

  4. #4
    Forum Contributor
    Join Date
    12-11-2023
    Location
    los altos, ca
    MS-Off Ver
    2016
    Posts
    156

    Re: book2 auto opened once book1 opened

    Hi Genius bakerman2. Thank you very much for your powerful, super quick code. I just tested it the code. It works smoothly. However, it is not automatically open book2.xlsm until I run the code. Did I do not correctly? Book1 used as a data entry form for multi users who will send data everytime they enter into Book1 to Book2.
    I need the code that automatically activated once Book1 opened which will automatically open Book2.
    Not sure if this is possible.
    Thanks I already added reps to your valuable time and quick help as always. Greatly appreciated.

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,569

    Re: book2 auto opened once book1 opened

    Did you put the code in the ThisWorkBook module of Book1, saved, closed and reopened Book1?

  6. #6
    Forum Contributor
    Join Date
    12-11-2023
    Location
    los altos, ca
    MS-Off Ver
    2016
    Posts
    156

    Re: book2 auto opened once book1 opened

    thank you Genius MikeVol for your super quick code, and your speedy help as always. I just tested the code as directed and it enables me to browse the networked drive which is great. However, I should be more clear that book1.xlsm is a data entry form for multi-users who will enter data which will be sent directly to book2.xlsm every time the entry completed.
    At this moment, the code requires both books (sending data - Book1, receiving data - Book2) to be opened.
    However, to be convenient, I would like the code that everytime Book1 is opened, Book2 will be automatically opened.
    Bakerman2 code works but I need to play the code.
    There must be a way?
    Reps to your precious time and hard work already added to all who have helped. Thanks again.

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,569

    Re: book2 auto opened once book1 opened

    Did you read my Post#5?

  8. #8
    Forum Contributor
    Join Date
    12-11-2023
    Location
    los altos, ca
    MS-Off Ver
    2016
    Posts
    156

    Re: book2 auto opened once book1 opened

    millions sorry Genius bakerman2. Your powerful code works miraculously. Thanks millions, millions reps to your super quick followup. My apology.

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,569

    Re: book2 auto opened once book1 opened

    You're welcome and thanks for rep+.

  10. #10
    Valued Forum Contributor MikeVol's Avatar
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    MSO Prof Plus 2021 x64 (En)
    Posts
    577

    Re: book2 auto opened once book1 opened

    @jojo4santa.
    Next time, read carefully what is written for you in the post! I understand that you need the macro code itself, but read the entire post! This is very important.
    Last edited by MikeVol; 07-07-2025 at 04:13 AM. Reason: Update post

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. apply vba code from book1 to book2
    By west123 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-06-2023, 08:24 PM
  2. Remove row from Book1 and paste it in Book2
    By Tona in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2016, 05:00 AM
  3. [SOLVED] Using a formulas from Book1 To Book2
    By Eric_Raine_85 in forum Excel General
    Replies: 3
    Last Post: 04-13-2016, 11:16 PM
  4. How to set a Global Macros so that it gets opened every time an excel file is opened?
    By pericopericone in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2013, 05:53 AM
  5. subtract values of book1 from book2
    By adyan76 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2009, 06:12 AM
  6. [SOLVED] When I open a workbook, another one called Book1 is also opened. W
    By Ian@MarlandLtd in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 05:40 AM
  7. Replies: 1
    Last Post: 11-08-2005, 08:40 AM

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