H
hlam
I got an Out of Range error closing a workbook using VBA on one machine but
not the other. Can any one help?
fName = Left(ThisWorkbook.Path, pos) & "SYS01 Report.xls"
Workbooks.Open Filename:=fName
Sheets(1).Select
Sheets(1).Copy Before:=Workbooks("SYS01 Program.xls").Sheets(1)
Workbooks("SYS01 Report").Saved = True
Workbooks("SYS01 Report").Close ... this is the code gets the error
ThisWorkbook.Sheets(1).Name = "CTL"
not the other. Can any one help?
fName = Left(ThisWorkbook.Path, pos) & "SYS01 Report.xls"
Workbooks.Open Filename:=fName
Sheets(1).Select
Sheets(1).Copy Before:=Workbooks("SYS01 Program.xls").Sheets(1)
Workbooks("SYS01 Report").Saved = True
Workbooks("SYS01 Report").Close ... this is the code gets the error
ThisWorkbook.Sheets(1).Name = "CTL"