Hello, have a problem with recording a small macro
I need : 1. take some .xls fail; 2.put some data in it 3. save with other name
Maybe somebedy can said where is a problem in script?
Thanx.
Sub TestReport()
Dim Excelsheet As Object
Set Excelsheet = GetObject("C:\Book2.xls")
ExcelSheet.Application.Cells(2, 1) = "111"
ExcelSheet.Application.Cells(5, 1) = "222"
ExcelSheet.Application.Cells(9, 1) = "aaa"
Excelsheet.SaveAs "C:\report_test.xls"
Excelsheet.Application.Quit
Set Excelsheet = Nothing
End Sub
Bookmarks