G
Guest
I am getting an error here:
Sheets("Sheet1").Copy After:=Windows(sFile).Sheets(1)
which says that
"Object doesn't support this property or method"
Here is the code that I used:
Call GetContractFileName
Workbooks.Open
FileName:="G:\USER\Contracts\Data_Files\All_2004_Catalog.xls"
sFile = contractfilename
cntNo = ContractNo
Sheets("Sheet1").Copy After:=Windows(sFile).Sheets(1)
Windows(sFile).Activate
Sheets(cntNo).Select
_____________________________________
Public Function GetContractFileName()
ContractNo = InputBox("Enter the Contract Number: ", "Contract File")
contractfilename = ContractNo & ".xls"
End Function
Sheets("Sheet1").Copy After:=Windows(sFile).Sheets(1)
which says that
"Object doesn't support this property or method"
Here is the code that I used:
Call GetContractFileName
Workbooks.Open
FileName:="G:\USER\Contracts\Data_Files\All_2004_Catalog.xls"
sFile = contractfilename
cntNo = ContractNo
Sheets("Sheet1").Copy After:=Windows(sFile).Sheets(1)
Windows(sFile).Activate
Sheets(cntNo).Select
_____________________________________
Public Function GetContractFileName()
ContractNo = InputBox("Enter the Contract Number: ", "Contract File")
contractfilename = ContractNo & ".xls"
End Function