Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application-defined or object-defined error - missing the basics
I am confident that the following problem stems from my lack of
understanding the core basics of VB. The following code works even when the sheet "CostAttributes" is not selected. Dim cellcount As Long Sheets("CostAttributes").Select cellcount = Sheets("CostAttributes").Range(("A7"), Range("A7").End(xlDown)).Rows.Count However I am trying to avoid having to select the "CostAttributes" sheet in the code so I have written: Dim cellcount As Long cellcount = Sheets("CostAttributes").Range(("A7"), Range("A7").End(xlDown)).Rows.Count and I get the application-defined or object-defined error message. Can anyone please help a lost newbie with this? TIA, Brent |
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) | |||
Macro Run-time Error 1004 Application Defined or Object Defined Error | Excel Programming | |||
Application-defined or object-defined error | Excel Programming | |||
Runtime Error 1004 -- Application Defined or Object Defined Error | Excel Programming |