Hi,
Below is the code that I use to copy an excel file to another folder, which works fine.
My question is: how can I rename the sheet 'Report_6' to 'Sheet1' after it has been copied?
This has to be done when the workbook also named 'Report_6' is closed.
Thx
Tech2
Sub CopyFile()
'
' CopyFile Macro
'
'
FileCopy "C:\Documents and Settings\user\My Documents\Folder\Report_6.xls", "C:\Documents and Settings\user\Desktop\Folder\Report_6.xls"
End Sub
Below is the code that I use to copy an excel file to another folder, which works fine.
My question is: how can I rename the sheet 'Report_6' to 'Sheet1' after it has been copied?
This has to be done when the workbook also named 'Report_6' is closed.
Thx
Tech2
Sub CopyFile()
'
' CopyFile Macro
'
'
FileCopy "C:\Documents and Settings\user\My Documents\Folder\Report_6.xls", "C:\Documents and Settings\user\Desktop\Folder\Report_6.xls"
End Sub