+ Reply to Thread
Results 1 to 3 of 3

control of active workbooks when 2 open and code in personal.xlsb

  1. #1
    Registered User
    Join Date
    11-12-2012
    Location
    ireland
    MS-Off Ver
    Excel 2007
    Posts
    1

    control of active workbooks when 2 open and code in personal.xlsb

    Hi,
    Need some help please:
    I am running code from my personal.xlsb - it completes some formating (first file it is ran in will be different every day), macro then opens a second file (this is static file same file will open every day).
    Macro stores data from 2nd file into 3 arrays and then i want to switch back to file 1 to search for data from file 2.
    I cannot activate file 1 again as code is not in file - cannot use activeworkbook or this workbook.

    At moment i am using code below - but obviously only works when running code from file called :"Delivery Nov 1st 2012.xls"
    Windows("Delivery Nov 1st 2012.xls").Activate

    Would like code to switch back to fiel 1 using variable so no matter which feil macro ran in it will work

    Thanks Alan_m20

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: control of active workbooks when 2 open and code in personal.xlsb

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: control of active workbooks when 2 open and code in personal.xlsb

    If I understand you correctly, maybe this will help?

    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)

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