Message 1 of 4
IV9 - Setting PartsListColumns Width to zero removes column, possible bug!

Not applicable
12-15-2004
05:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I found that setting column width to 0 removes the column from partslist.
Public Sub TestPartsListRemove()
Dim oDrawDoc As DrawingDocument
Dim oPartList As PartsList
Dim oPartsListColumn As PartsListColumn
Set oDrawDoc = ThisApplication.ActiveDocument
Set oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
For i = 1 To oPartList.PartsListColumns.Count
'This removes column from partslist. Possible bug!
oPartList.PartsListColumns.Item(i).Width = 0
'Correct way to remove column
'oPartList.PartsListColumns.Item(i).Remove
Next i
Set oDrawDoc = Nothing
Set oPartList = Nothing
Set oPartsListColumn = Nothing
End Sub