VISHAL120
09-27-2011, 06:57 AM
Hi All.
I have the following code which am using to create a back up copy of my workbook:
Sub Create_Backup_Data()
Application.DisplayAlerts = False
ThisWorkbook.Activate
Wip_Workbook_Name = ThisWorkbook.Name
FileSystem.ChDir (ThisWorkbook.Path)
'ChDir "C:\Documents and Settings\My Documents\main\BKUP"
Current_Date = Format(Date, "dd mm yyyy")
Current_Time = Format(Time, "HH MM SS")
Bkup_Workbook_Name = "Bkup @ " & Current_Date & " - " & Current_Time & " _ " & ThisWorkbook.Name
ActiveWorkbook.SaveAs Filename:=Bkup_Wip_Workbook_Name
'ActiveWorkbook.SaveAs Filename:=Wip_Workbook_Name
Application.DisplayAlerts = True
End Sub
the problem is it save the back up on the same folder where the original file resides. i want it to be saved on another folder but since now i have not been able to do it.
i have tried to put different directory and folder but it saved my original file there.
thanks for the help.
I have the following code which am using to create a back up copy of my workbook:
Sub Create_Backup_Data()
Application.DisplayAlerts = False
ThisWorkbook.Activate
Wip_Workbook_Name = ThisWorkbook.Name
FileSystem.ChDir (ThisWorkbook.Path)
'ChDir "C:\Documents and Settings\My Documents\main\BKUP"
Current_Date = Format(Date, "dd mm yyyy")
Current_Time = Format(Time, "HH MM SS")
Bkup_Workbook_Name = "Bkup @ " & Current_Date & " - " & Current_Time & " _ " & ThisWorkbook.Name
ActiveWorkbook.SaveAs Filename:=Bkup_Wip_Workbook_Name
'ActiveWorkbook.SaveAs Filename:=Wip_Workbook_Name
Application.DisplayAlerts = True
End Sub
the problem is it save the back up on the same folder where the original file resides. i want it to be saved on another folder but since now i have not been able to do it.
i have tried to put different directory and folder but it saved my original file there.
thanks for the help.