Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application-defined or object-defined error
Hi Deepak,
Most likely you have a reference that is not fully qualified. ..Cells(RowNo, tCol)... In Excel means activesheet in the active workbook. From VB6 it would be unqualified because you haven't specified the workbook object. This causes VB6 to try find "Cells" in the object lib. It will, but it will find Excels global object "cells". So change ".Cells" to "objwb.Cells" in all three instances. -- John johnf202 at hotmail dot com "Deepak Dembla" wrote in message ... hello everyone, I am using VB 6.0 with SP5 on a win2k pro machine with office 2k installed. The following code: .Cells(RowNo, tCol).FormulaR1C1 = "=Sum(" & .Cells(RowNo, tCol - 1).Address & ":" & .Cells(RowNo, tCol - UBound(arrVehicles)).Address & ")" returns a "Application-defined or object-defined error" 1004. how ever, when i went to debug mode and saw the values it showed me $F$20 = Sum($E$20:$C$20) which is correct, but the error still appears. wht I am trying to do here is adding up the previous 3 cell values to the fourth one. Can any one help me out? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run-time error '50290': Application-defined or object-defined erro | Excel Discussion (Misc queries) | |||
Application-defined or object-defined error Please Help | Excel Discussion (Misc queries) | |||
Runtime Error 1004 -- Application Defined or Object Defined Error | Excel Programming | |||
VBA - Application-defined or object-defined error | Excel Programming | |||
VBA - Application-defined or object-defined error | Excel Programming |