View Full Version : Inserting a row in Excel from AutoCAD

2004-10-27, 02:22 PM
Hi all,

Need a little help with this one. I have a VBA routine and I am needing to insert a row in Excel. My routine takes some data from a drawing and places that data into Excel. I have a need to sort the data as I'm putting it in, and if it needs to go before previously sorted data, then I need to insert a row.

From Excel, I was able to get this to work:

But, when I put it into my code in AutoCAD, it gives me an error :confused::

Compile error:

Sub or Function not defined
I don't know what else to try. If someone could give me a push, I would appreciate it.


2004-10-27, 03:13 PM
Nevermind, I figured it out. This is what I came up with:


But, if anyone knows how to properly set the row height, I'm all ears ;).

Have a great one :beer:

2004-10-27, 03:36 PM
I figure the row height out too. I was trying to use this:

wkSheet.cells(iRow, 1).EntireRow.Height = 15
But, I was needing this instead:

wkSheet.cells(iRow, 1).EntireRow.RowHeight = 15

Just me overlooking something simple (again).

Have a great day everyone! :-D