+ Reply to Thread
Results 1 to 5 of 5

copy of file in the same folder path without opening

  1. #1
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    copy of file in the same folder path without opening

    Hi all,

    Requesting help for the vba syntax for below requirements.

    I have a file "Report for 22.04.2014" in the folder path "C:\Users\Desktop\open\"

    what i am doing currently is opening this file and saveas with current date.

    instead since the file size is huge

    i would like vba code to make copy of this file and rename File with current date ( without opening ).
    So this should save some time in opening the file.

  2. #2
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Karlstad, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    232

    Re: copy of file in the same folder path without opening

    Please Login or Register  to view this content.
    1. Reply to thread and inform if suggestion was helpful or not
    2. Click on the star (=Add Reputation) if you think someone helped you
    3. Mark [SOLVED] to this thread if solution was found. (On Menu "Thread Tools" > "Mark this thread as solved")

  3. #3
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: copy of file in the same folder path without opening

    Thanks for the reply.

    i am getting
    Run time error '90'
    Permission denied

    any idea why am i getting this

  4. #4
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Karlstad, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    232

    Re: copy of file in the same folder path without opening

    I looked in HELP for FileCopy. It says "An error occurs if the file is open". Is your file open?

    Otwerwise, I was searching for Run-Time Error 90. Found this:

    http://avidowlmarketing.com/windows-run-time-error-90/

    Maybe another member on this site might have an input.

  5. #5
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: copy of file in the same folder path without opening

    Hi Joakim N,

    I have fixed it myself, the error was due to the file extension. The file i had is .xlsm but i was executing the code for .xlsx
    That created the Runtime error.

    Thanks for your help . Have added stars for you

+ 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] Copy files from one folder to another folder (path in textbox)
    By yoko21 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2014, 02:45 AM
  2. Code to list the folder path and sub folder path of a specific file
    By kalai1587 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2013, 03:51 AM
  3. Opening a folder from a stored file path
    By bocaj315 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2013, 03:53 AM
  4. [SOLVED] Save As Dialog Box - Default Path and File Name, User Selects Sub Folder from Default Path
    By christenprochaska in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2012, 05:17 PM
  5. Specified folder path to select file path
    By JayEmTee91 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2012, 10:38 AM

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