ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   R/T error 40036 (https://www.excelbanter.com/excel-programming/394264-r-t-error-40036-a.html)

JMay

R/T error 40036
 
With data in Range a1:a9 of sheet1

Why in the Immediate window when I enter:

lrow = activesheet.cells(Rows.Count, 1).end(xlUp).row
or
lrow = activesheet.cells(Rows.Count, 1).end(xlUp)

Why do I get this error Application-defined or Object-defined error?

TIA,

Jim

Zone[_3_]

R/T error 40036
 
I don't get the error unless the selected sheet is not a worksheet. For
instance, if you have a chart on the sheet and the chart is selected, you'll
get an error on this code. James

"JMay" wrote in message
...
With data in Range a1:a9 of sheet1

Why in the Immediate window when I enter:

lrow = activesheet.cells(Rows.Count, 1).end(xlUp).row
or
lrow = activesheet.cells(Rows.Count, 1).end(xlUp)

Why do I get this error Application-defined or Object-defined error?

TIA,

Jim




JMay

R/T error 40036
 
I thing Excel sometimes get indigestion - I closed the wb in question started
a new one,,, it worked..

"Zone" wrote:

I don't get the error unless the selected sheet is not a worksheet. For
instance, if you have a chart on the sheet and the chart is selected, you'll
get an error on this code. James

"JMay" wrote in message
...
With data in Range a1:a9 of sheet1

Why in the Immediate window when I enter:

lrow = activesheet.cells(Rows.Count, 1).end(xlUp).row
or
lrow = activesheet.cells(Rows.Count, 1).end(xlUp)

Why do I get this error Application-defined or Object-defined error?

TIA,

Jim






All times are GMT +1. The time now is 12:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com