matfishe
Technical User
- Apr 2, 2011
- 4
Hello,
Im getting the error " Object Required: 'ActiveCell.Resize(...).Slect' ". My code looks like this:
'Declare variables and open excel then open the specified file
dim objExcel005, ExcelWB005, osheet005
set objExcel005 = createobject("Excel.Application")
objExcel005.visible = true
set ExcelWB005 = objExcel005.Workbooks.Open("C:\Program
Files\Automated Flood Warning Software\Logs\Jackson Creek Post Office.csv")
objExcel005.Selection.find("12:00").activate
objExcel005.ActiveCell(1, 3).Select
Set oSheet005 = ExcelWB005.Worksheets(1)
Set oRange005 = objExcel005.ActiveCell.Resize(3, 1).Select
objExcel005.Selection.Copy
oSheet1.Range("A400") = objExcel005.WorksheetFunction.Sum(oRange005)
oSheet1.Range("A400").Copy
the error happens on the "Set oRange005 = objExcel005.ActiveCell.Resize(3, 1).Select"
Also its not using sum for the data that is selected.
Thanks in advance!
Im getting the error " Object Required: 'ActiveCell.Resize(...).Slect' ". My code looks like this:
'Declare variables and open excel then open the specified file
dim objExcel005, ExcelWB005, osheet005
set objExcel005 = createobject("Excel.Application")
objExcel005.visible = true
set ExcelWB005 = objExcel005.Workbooks.Open("C:\Program
Files\Automated Flood Warning Software\Logs\Jackson Creek Post Office.csv")
objExcel005.Selection.find("12:00").activate
objExcel005.ActiveCell(1, 3).Select
Set oSheet005 = ExcelWB005.Worksheets(1)
Set oRange005 = objExcel005.ActiveCell.Resize(3, 1).Select
objExcel005.Selection.Copy
oSheet1.Range("A400") = objExcel005.WorksheetFunction.Sum(oRange005)
oSheet1.Range("A400").Copy
the error happens on the "Set oRange005 = objExcel005.ActiveCell.Resize(3, 1).Select"
Also its not using sum for the data that is selected.
Thanks in advance!