K
Khaki
Hi,
I am having a horrible time at tracking this down, but basically SumI
is not working within VB6.
I get Run-time error 1004
Unable to get the SumIF property of the WorksheetFunction Class
Code:
If sID = "050" Then
sTemp = "O" & iTop & ":O" & iBottom
dTemp = excel.WorksheetFunction.SumIf(wDataSource.Range(sTemp)
">0") ' Line that causes Runtime error 1004
.Cells(iCurrentRow, CI_StartColumnTotal).Value = dTem
'WorksheetFunction.SumIf(wDataSource.Range(sTemp), ">0")
Else
.Cells(iCurrentRow, CI_StartColumnTotal).Value
WorksheetFunction.Sum(wDataSource.Range("O" & iTop & ":O" & iBottom))
'Sum works fine
End If
I am using VB6, and Excel 2K, and this is writing code inside a CO
add-in for Excel.
Any help would be appreciated.
I am having a horrible time at tracking this down, but basically SumI
is not working within VB6.
I get Run-time error 1004
Unable to get the SumIF property of the WorksheetFunction Class
Code:
If sID = "050" Then
sTemp = "O" & iTop & ":O" & iBottom
dTemp = excel.WorksheetFunction.SumIf(wDataSource.Range(sTemp)
">0") ' Line that causes Runtime error 1004
.Cells(iCurrentRow, CI_StartColumnTotal).Value = dTem
'WorksheetFunction.SumIf(wDataSource.Range(sTemp), ">0")
Else
.Cells(iCurrentRow, CI_StartColumnTotal).Value
WorksheetFunction.Sum(wDataSource.Range("O" & iTop & ":O" & iBottom))
'Sum works fine
End If
I am using VB6, and Excel 2K, and this is writing code inside a CO
add-in for Excel.
Any help would be appreciated.