Results 1 to 3 of 3

Thread: Inserting a row in Excel from AutoCAD

  1. #1
    I could stop if I wanted to msretenovic's Avatar
    Join Date
    2002-02
    Location
    Galloway, Oh
    Posts
    305
    Login to Give a bone
    0

    Question Inserting a row in Excel from AutoCAD

    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:
    Code:
    Rows(iRow).Insert
    But, when I put it into my code in AutoCAD, it gives me an error :
    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.

    TIA,

  2. #2
    I could stop if I wanted to msretenovic's Avatar
    Join Date
    2002-02
    Location
    Galloway, Oh
    Posts
    305
    Login to Give a bone
    0

    Lightbulb Re: Inserting a row in Excel from AutoCAD

    Nevermind, I figured it out. This is what I came up with:

    Code:
    wkSheet.cells(iRow,1).EntireRow.Insert
    But, if anyone knows how to properly set the row height, I'm all ears .

    Have a great one

  3. #3
    I could stop if I wanted to msretenovic's Avatar
    Join Date
    2002-02
    Location
    Galloway, Oh
    Posts
    305
    Login to Give a bone
    0

    Default Re: Inserting a row in Excel from AutoCAD

    I figure the row height out too. I was trying to use this:

    Code:
     wkSheet.cells(iRow, 1).EntireRow.Height = 15
    But, I was needing this instead:
    Code:
     wkSheet.cells(iRow, 1).EntireRow.RowHeight = 15
    Just me overlooking something simple (again).

    Have a great day everyone!

Similar Threads

  1. How do I maintain lineweights when inserting dwg into Excel?
    By Pat-North in forum AutoCAD General
    Replies: 9
    Last Post: 2009-04-06, 02:36 PM
  2. Inserting Excel Worksheet
    By mmenendez in forum Revit Architecture - General
    Replies: 6
    Last Post: 2006-06-16, 05:21 PM
  3. inserting Excel file
    By johnbellenger in forum Software
    Replies: 4
    Last Post: 2005-02-08, 08:11 AM
  4. Replies: 5
    Last Post: 2005-01-25, 04:27 PM
  5. INSERTING EXCEL SPREADSHEETS
    By howard.16379 in forum ACA General
    Replies: 1
    Last Post: 2004-09-17, 02:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •