Message 1 of 10
Setting drawing properties with a ComboBox

Not applicable
02-01-2005
12:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am using the following code to set a custom drawing property in ACAD 2005
using a ComboBox and DropDown list. The code works fine except for when you
type in a value that is not in the list. Any help will be much appreciated.
Style = 0-fmStyleDropDownCombo
Locked = False
Private Sub ComboBox2_Click()
Dim Key1 As String
Dim Value1 As String
Dim CustomPropertyLine As String
Dim PropertyLineValue As String
ComboBox2.DropDown
' Set value for Line
CustomPropertyLine = "Line"
ThisDrawing.SummaryInfo.GetCustomByIndex 1, Key1, Value1
ThisDrawing.SummaryInfo.SetCustomByIndex 1, CustomPropertyLine,
ComboBox2.Value
End Sub
Private Sub UserForm_Initialize()
ComboBox2.AddItem "LINE1"
ComboBox2.AddItem "LINE2"
ComboBox2.AddItem "LINE3"