Hello All,
I am trying to make my reference for "August.xlsm" so that if it was renamed (i.e. "August 8-15-11") the code would still know to reference that workbook. Is this possible?
Also I have the same issue in the next part of my code. I want to save the "September.xls" workbook to "My Documents" for which ever user has the file. So if the user was not Jim Lewis it would still save the workbook to the current user's "My Documents". Would this be possible?
Thanks,
I am trying to make my reference for "August.xlsm" so that if it was renamed (i.e. "August 8-15-11") the code would still know to reference that workbook. Is this possible?
Also I have the same issue in the next part of my code. I want to save the "September.xls" workbook to "My Documents" for which ever user has the file. So if the user was not Jim Lewis it would still save the workbook to the current user's "My Documents". Would this be possible?
Code:
Workbooks.Add
Sheets("Sheet1").Name = "Data"
Workbooks("August.xlsm").Sheets("Data").Range("$A$1:$O$50000").Copy
ActiveWorkbook.Sheets("Data").Range("$A$1:$O$50000").PasteSpecial Paste:=xlPasteAllUsingSourceTheme
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Jim Lewis\My Documents\September.xls", FileFormat:= _
xlExcel8, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
Thanks,