![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 18
|
Why would I get an 'Application or Object Defined error' for the following lines of code.
With Worksheets("Output") .Cells(Heading_Cell_Number, 2).Value = "Housing" & (Housing_Cell_Number - 4) & " Top" THis code worked before when it was part of another Sub but then I had to place it in its own Sub after the other Sub got too large. I would greatly appreciate help. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Hi Serious,
Its a bit hard to say without seeing the complete context. I noticed you didn't include the End With statement, but assume there is one. Otherwise you would have gotten a compile error. How is Heading_Cell_Number declared (or is it declared)?, and how is it set? Is it possible it has a non-numeric value or is zero or negative? Damon |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|