+ Reply to Thread
Results 1 to 11 of 11

To automatically set to activate Workbook1 as the default workbook on reactivate Excel

  1. #1
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    hi,

    i'm no vba expert, and in the past all the problems i had i could attempt myself by Googling and if that didn't work , i'd try asking for the proper solution here.

    But now I have an issue that i have no idea at all how to begin at to attempt at any code. I have to have 5 workbooks open every time for my daily work and then i have to manually run between my browser and back to Excel to input data in Workbook1 only, and this running between has gotten tiring and impractical over time for my aging eyesight with increasing manual inputs & data, i find myself having to stare harder to look for my Workbook1 at the bottom of the WINDOWS screen to reactivate Workbook1.

    All i want is just to have Excel automatically always set to activate Workbook1 as the default workbook, & Maximised whenever i return from my countless manual browser trips, because every time Excel would not just lose both the focus & the maximise already written for each Workbook Open & Worksheet Activate, and primarily Excel does not know which workbook to activate when I reactivate Excel. So, i'm still wondering if there is any way to write a code for this objective, assuming it is possible ? And if yes, where exactly would the code be written to ?



    Stewart

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    You can conceivably write a public macro in your personal file that is called up with a key combination that when executed, will set your master workbook as the default / active workbook and bring it to the for-front?

  3. #3
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    well, that wouldn't be solving the original problem, because i would still have to manually look for the personal file every time i return from browsing, recreating a new but similar problem, because the personal file would have the same problem as the Workbook1 wouldn't it?

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    You could un-maximise the screen for Workbook 1 and for the Brower, tile them so that there is always an edge of the window peeking out and just click the windows to work between them.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    I think what maniacb suggest is worth to try.
    In the Personal.xlsb, create a macro something like :
    Please Login or Register  to view this content.
    Assign a keyboard shortcut to it. For example : ctlr+w, then save it.

    Next time with a condition something like this :
    There are 100 opened workbooks in the taskbar while the user is browsing the internet with Firefox.
    At the time the user want to comeback to work with Excel,
    the user click any Excel workbook in the taskbar then ctrl+w in the keyboard...
    the "default" workbook then activated.

    Maybe it's not exactly you want, but at least now you don't have to:
    stare harder to look for my Workbook1 at the bottom of the WINDOWS screen to reactivate Workbook1

  6. #6
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    hi Mike

    that doesn't work, because i dont have to unmaximise Workbook1, every time i leave excel it minimises itself with all the other 4 workbooks, and somehow only Workbook1 disappears from minimised view leaving 4 minmised unwanted Workbooks tabs at the bottom of the WINDOWS Excel reactivate bar. I have to select any of the unwanted 4 workbooks, minimise it, then l'd be able to see minimised Workbook1 again, I dont know why. Those 4 workbooks are actually supplementary workbooks as in they were opened by Workbook1, their 'father'

  7. #7
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    hi there Karmapala,

    i'll give this a go, but xlsb...why does it have to be a binary file? I mean can it be a Personal.xlsm?
    Last edited by AliGW; 06-29-2020 at 07:46 AM. Reason: Please don't quote unnecessarily!

  8. #8
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    Hi MannStewart,

    I'm sorry I don't know why the personal workbook is in xlsb format.
    But my guess it's maybe to make the file size is not too big.

  9. #9
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    hi Karmapala

    i have created the Personal.XLSB (for the first time), but it won't launch automatically when I start Excel. I just need to test it first after recording the macro, but it won't come out. Any idea why..?
    Last edited by AliGW; 06-29-2020 at 07:46 AM. Reason: Please don't quote unnecessarily!

  10. #10
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    Hi MannStewart,

    Excel will create for you the Personal.xlsb file if you don't have it yet.

    Please try like this step :
    Open your "default" workbook and your "child" workbook.
    Within your "child" workbook active, in Excel developer tab, click "Record Macro".

    A window something like the image below will show up :
    EXCEL_2020-06-29_19-55-31.png

    In the image above, I already fill the shortcut key with Ctrl+w,
    and in the dropdown list of "Store macro in", I select the "Personal Macro Workbook".

    Soon after you hit the "OK" button, activate your "default" workbook, then stop the macro recorder.
    In the vba editor's Project Explorer, you will see a workbook named "PERSONAL.XLSB", have a look on it's module1.
    You will see the recorded macro there. Save it.

    NB : please don't forget to delete your manually created "personal.xlsb" file .
    Last edited by karmapala; 06-29-2020 at 08:03 AM.

  11. #11
    Forum Contributor
    Join Date
    10-08-2019
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    326

    Re: To automatically set to activate Workbook1 as the default workbook on reactivate Excel

    ok

    though not the ideal i was visualising of, that's still better than my current situation.

    Thanks again for your guide Karmapala, and Maniacb for the idea.

    Stewart.

+ 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. [SOLVED] When saving worksheet as a new workbook I cannot reactivate original workbook
    By pongmeister in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2019, 06:44 AM
  2. When saving worksheet as a new workbook I cannot reactivate original workbook
    By pongmeister in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-02-2019, 04:35 PM
  3. [SOLVED] Macro: Copies row i in Workbook1 to row j of Workbook i
    By excel_novice2019 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-24-2019, 07:46 AM
  4. workbook to extract data without reactivate
    By biznez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2015, 10:48 PM
  5. Replies: 3
    Last Post: 10-16-2013, 07:17 AM
  6. Activate macro is running well independently but not in this workbook automatically
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2013, 08:23 PM
  7. Replies: 1
    Last Post: 05-18-2005, 09:06 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