ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Object doesn't support this property or method (Error 438) (https://www.excelbanter.com/excel-discussion-misc-queries/34920-object-doesnt-support-property-method-error-438-a.html)

Kiran

Object doesn't support this property or method (Error 438)
 
Hi,
This is the code that is giving the above error,
Set objList = Worksheets(1).ListObject(0).ListRows.Add
I got this code from the MS Help in excel. I am trying to dynamically add a
row at a specified location. Can anyone help with this.
Thanx


Jim Rech

The object is ListObjects with an "s". Also the first one would have an
index of 1 so 0 I think is invalid

Worksheets(1).ListObjects(1).ListRows.Add

--
Jim
"Kiran" wrote in message
...
| Hi,
| This is the code that is giving the above error,
| Set objList = Worksheets(1).ListObject(0).ListRows.Add
| I got this code from the MS Help in excel. I am trying to dynamically add
a
| row at a specified location. Can anyone help with this.
| Thanx
|




All times are GMT +1. The time now is 03:23 AM.

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