+ Reply to Thread
Results 1 to 4 of 4

Copy/paste variable wbk names

  1. #1
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Copy/paste variable wbk names

    Workbook 1 name will always contain the words "Access Update" but the rest of the file name will change based on the date
    Workbook 2 name will always contain the words "Outage Tracker" but the rest of the file name will change based on the month

    1. Browse for Workbook 2
    2. Add a new tab to Workbook 2 and rename it based on yesterday's date
    3. Copy what's written on the "Outages" worksheet in Workbook 1 (which is where the macro launches from so it's already open)
    4. Paste into A1 of the new tab created in step 2.

    Any ideas on how to accomplish step 4? The code in Bold seems to be the trouble.
    Or ideas how to simply my current code with perhaps SourceWB and DestinationWB?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy/paste variable wbk names

    I think this is how I would do that:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Re: Copy/paste variable wbk names

    perfect thanks!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy/paste variable wbk names

    As it appears you've reached a conclusion, I've marked this thread SOLVED for you.
    FYI, this is done through the Thread Tools located above the first post in this thread. Thanks.

+ 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. Copy/paste all worksheet names into one sheet
    By contra76 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-10-2014, 04:24 PM
  2. copy image names and paste as list
    By Blake 7 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-11-2012, 11:58 AM
  3. Copy Between specified names and paste
    By Rodrigo Rocha in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-20-2010, 05:43 PM
  4. copy destination with variable worksheet names
    By Maglor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2009, 10:55 PM
  5. [SOLVED] Copy between variable workbook names
    By AdP in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2005, 02:05 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