+ Reply to Thread
Results 1 to 5 of 5

Open Another Workbook from Active Workbook but stay on Active Workbook.

  1. #1
    Forum Contributor
    Join Date
    10-17-2014
    Location
    EU
    MS-Off Ver
    2013
    Posts
    114

    Open Another Workbook from Active Workbook but stay on Active Workbook.

    I have an Active Workbook, name of the workbook will be changing (so cannot apply macro on Workbook name), but macros will stay same. On Active Workbook (eg. on Sheet2) I would need a Macro that opens another Workbook (eg. WB2.xlsx ) but "cursor" should stay on the Sheet in that Active Workbook from where the macro is activated.

    Then I would try to find "CLOSE" macro meaning when I close my Active Workbook also file WB2 closes.

    Thank you for suggestions,

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Open Another Workbook from Active Workbook but stay on Active Workbook.

    Set the Active workbook in a variable and also the activecell in a variable and use that variables to select the actual workbook and cell


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    10-17-2014
    Location
    EU
    MS-Off Ver
    2013
    Posts
    114

    Re: Open Another Workbook from Active Workbook but stay on Active Workbook.

    First part I've solved that way:

    Application.Workbooks.Open ("C:\...\WB2.xlsx")
    ThisWorkbook.Activate


    How to apply operation for "closing"?
    Last edited by Tona; 10-29-2014 at 06:29 AM.

  4. #4
    Forum Contributor
    Join Date
    08-10-2014
    Location
    Alberta
    MS-Off Ver
    2016
    Posts
    128

    Re: Open Another Workbook from Active Workbook but stay on Active Workbook.

    Basically...(I hope)

    Please Login or Register  to view this content.
    I missed the last part, sorry. Basically what Sixthsense said
    Last edited by Templemind; 10-29-2014 at 06:37 AM.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Open Another Workbook from Active Workbook but stay on Active Workbook.

    Please Login or Register  to view this content.

+ 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] Making backup copy of active workbook while workbook is open
    By Bezzie in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-01-2014, 06:06 AM
  2. [SOLVED] Code to detect previous active workbook instead of current active workbook
    By kosherboy in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-25-2014, 01:58 AM
  3. Open workbook, filter values, copy/paste into Active workbook.
    By niceguy21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2013, 12:17 PM
  4. [SOLVED] Copying worksheet from another open workbook using variables, paste to active workbook
    By sanpedro_nz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2012, 08:25 AM
  5. [SOLVED] COPY from an open workbook with particular sheet and columns to active workbook
    By purin0c0 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2012, 03:57 PM

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