+ Reply to Thread
Results 1 to 4 of 4

Activate window with a macro

  1. #1
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294

    Activate window with a macro

    Hi,

    I'm building a macro that takes various data off one sheet and places it onto another. The last line of code is where I'm having problem. The name of that file ("01-10-07 Freight Details") will change every week depending on the date. I don't want to have to change the macro every week. What would I write the macro would go to whatever other open workbook there is after it opens the first one?


    Workbooks.Open(Filename:= _
    "S:\malone\Journal Entries\Journal Entry Templates\LCI template.xls", _
    UpdateLinks:=0).RunAutoMacros Which:=xlAutoOpen
    Windows("01-10-07 Freight Details.xls").Activate

    Please let me know if you need any more information.]

    Thanks in advance,

    Eddie.

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    My recommendation would be to have a dedicated sub-directory in which you could search for the last saved file ...
    HTH
    Carim


    Top Excel Links

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    to goto the next open workbook use
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    Thank you so much for your replies. Sorry I haven't been able to get back to until now.

    Eddie.

+ 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