+ Reply to Thread
Results 1 to 3 of 3

VBA Code to Copy and Move Closed Workbook

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    6

    VBA Code to Copy and Move Closed Workbook

    I am hoping someone can help me improve on my code with improvements I am trying to make. I am copying my code below, as it works now it scans the first column and creates a folder in my desired location with the name of what is entered in the cell and also creates a link to the newly created folder. This is for tracking of work every folder that is created I have to manually go in copy an excel workbook sign-off form and rename it to the same thing as the folder name also the same as what is entered in the cell in column A that created the folder.

    I would like to automate this process so after the folder and link are created it then copies the sign-off work book with the new name in the newly created folder. Any suggestions.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Code to Copy and Move Closed Workbook

    Try something like this using the FileSysyemObject.CopyFile method. Change the Source file name to suit.

    Please Login or Register  to view this content.
    Aslso note; dir is a VBA command. You may want to use a different variable name to avoid confusion e.g.; strDir.

  3. #3
    Registered User
    Join Date
    01-22-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: VBA Code to Copy and Move Closed Workbook

    Worked perfectly much simpler than I anticipated, Thank you for your help and the dir tip.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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