Hi,
I have created macro to copy workbook from a main workbook and save it in a location with filename as date which i am giving input earlier... I need to check whether the file i am saving is already in the location..
Below code is for saving the excel in the location.. (excel is created between start date and end date i am giving as input)...
Workbooks.Open ("C:\Main.xls")
Worksheets("Sheet1").Activate
Worksheets("Sheet1").Range("E3:E185").ClearContents
Worksheets("Sheet1").Range("B2").ClearContents
For i = 0 To Sheetcount
date1 = dateval1 + i
filename = Format(date1, "dd-mm-yy") & ".xls"
ActiveWorkbook.SaveAs filename:=filepath & filename
Worksheets("Sheet1").Range("B2") = date1
ActiveWorkbook.Save
Next i
If yuo could provide me some code that would be of great help..
Thanks,
srikanth
Bookmarks