+ Reply to Thread
Results 1 to 6 of 6

Macro to Copy Workbook from One Drive to another at a Specific Time

  1. #1
    Registered User
    Join Date
    11-05-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010
    Posts
    10

    Macro to Copy Workbook from One Drive to another at a Specific Time

    Hi,

    Everyday I need to copy a sheet which is updated by users and saved a Public Drive and I need to copy into my Personal Drive.This is done at a specific time which is at 1.PM.

    Is there a macro which would copy sheet from Public Drive to my Personal Drive at 1PM everyday, I might be loged-in or loged-off from PC.


    Thanks

  2. #2
    Registered User
    Join Date
    11-05-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Copy Workbook from One Drive to another at a Specific Time

    Hi,

    Can someone help me with this or else I will mark as solved.

  3. #3
    Registered User
    Join Date
    08-23-2010
    Location
    india,Chennai
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: Macro to Copy Workbook from One Drive to another at a Specific Time

    you can schedule this in "Task Scheduler" in windows

    write small vbscript to copy file and schedule it

  4. #4
    Registered User
    Join Date
    11-05-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Copy Workbook from One Drive to another at a Specific Time

    Thank you Mohanvijay for your help. Sorry but I am not aware of vbscript.

    Can you please suggest vbscript code for the below code which I used to copy the sheet. And also can you suggest how can I learn vbscript.

    Private Sub Copy_sheet()

    FileCopy Source:="D:\Ashish\VBA\Practice\Scheduler\Copysheet.xlsm", Destination:="D:\Ashish\VBA\Copysheet.xlsm"

    End Sub

  5. #5
    Registered User
    Join Date
    08-23-2010
    Location
    india,Chennai
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: Macro to Copy Workbook from One Drive to another at a Specific Time

    vbscript is lightweghit language of vba so if you know vba then you also know vbscript

    vbscript files come with extension .vbs


    FileCopy Source:="D:\Ashish\VBA\Practice\Scheduler\Copysheet.xlsm", Destination:="D:\Ashish\VBA\Copysheet.xlsm"

    copy the above your code and paste it into notepad and save as with .vbs extension
    and schedule it

  6. #6
    Registered User
    Join Date
    11-05-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Copy Workbook from One Drive to another at a Specific Time

    when I schedule a task with your instructions, it is just opening the .vbs file and not running the code in it or copying the excel file.

    I guess in the Actions field of create task I selected "Start a Programm" thats why it is opening the file, however there are only two other options "Send an e-mail", "Display a Message".

    I might be wrong, can you please suggest. Thank you.

+ 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