LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Member
 
Posts: 46
Default

Quote:
I'm curious as to whether or not you can simply load the attributes
into an array and 'dump' the array into a blank worksheet like this...

XlSheet.Cells(1).Resize(Ubound(Array1), Ubound(Array1, 2)) = Array1

...which assumes Array1 becomes a 2D array after the attributes are
loaded into it!
I'm not exactly sure where to place it but I tried it in several locations and it gives an error message "Subscript out of range" in each


However the following does array in 2D
Dim vAttrData
vAttrData = XlSheet.UsedRange

So I been trying to figure out how to grab it and sent it back in to autocad.. Anyways I need to do a lot more reading up on this...
Code:
         For i = LBound(newAttribs) To UBound(newAttribs)
           For Count = LBound(newAttribs) + 2 To UBound(newAttribs) + 2
             If blkEntity.handle = vAttrData(Count, 1) Then
                  
                  Select Case newAttribs(i).TagString
'                  Case "HANDLE"
'                     handle = newAttr.TextString
                  Case "TAG"
                      newAttribs(i).TextString = vAttrData(Count, 2).TextString
                  Case "LOOP"
                      tmpAttr(2) = vAttrData(Count, 3).TextString
                  Case "ADDRESS"
                      tmpAttr(3) = vAttrData(Count, 4).TextString
                  Case "LABEL1"
                      tmpAttr(4) = vAttrData(Count, 5).TextString
                  Case "LABEL2"
                      tmpAttr(5) = vAttrData(Count, 6).TextString
                  Case "DEVICE_LABEL"
                      tmpAttr(6) = vAttrData(Count, 7).TextString
                  Case "EXTENDED_LABEL"
                      tmpAttr(7) = vAttrData(Count, 8).TextString
                  Case "QTY"
                      tmpAttr(8) = vAttrData(Count, 9).TextString
                  Case "MODEL_NUM"
                      tmpAttr(9) = vAttrData(Count, 10).TextString
                  Case "DESCRIPTION"
                      tmpAttr(10) = vAttrData(Count, 11).TextString
                  Case "VENDOR"
                      tmpAttr(11) = vAttrData(Count, 12).TextString
                  Case "CSFM_NUM"
                      tmpAttr(12) = vAttrData(Count, 13).TextString
  
                  End Select
               End If
            Next Count
         Next i
             AttrData.Add tmpAttr   'Entity(i).Update
      End If
      End If
    Next Entity
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Process dumped into an array...and then back to sheet Howard Excel Programming 27 March 28th 13 12:07 AM
Modify RDB's Copy filtered data code to loop through multiple shee Jules Excel Programming 5 February 25th 10 07:26 PM
returning back to loop check condition without completing the loop ashish128 Excel Programming 13 April 3rd 08 12:53 PM
Pivot Table Code in a For loop Otto Moehrbach Excel Programming 2 January 16th 07 03:18 AM
Modify a process priority [email protected] Excel Programming 2 January 9th 06 12:39 PM


All times are GMT +1. The time now is 08:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"