J
jayhankins
I am trying to add a forms 2.0 lisbox or combobox to a visio page. The
box will be populated with data that that comes from an other shape
eventually. The problem is that when I try to use the AddItem method
in a macro I get an object does not support this property or method
error. Here is the code I am trying:
"Sub addItemMacro()
Dim x
Dim index
Set myListBox = ActivePage.Shapes("Sheet.1")
For x = 1 To 5
index = myListBox.AddItem(x)
Next x
End Sub"
This code gives me a type mismatch with AddItem highlighted:
"Private Sub alarmListBox_Click()
Dim index
Dim x
For x = 1 To 10
index = alarmListBox.AddItem(x)
Next x
End Sub"
I am not very skilled at this sort of thing but I can usually muddle
through. However I can't seem to get this to work.
Thanks for your help
jph
box will be populated with data that that comes from an other shape
eventually. The problem is that when I try to use the AddItem method
in a macro I get an object does not support this property or method
error. Here is the code I am trying:
"Sub addItemMacro()
Dim x
Dim index
Set myListBox = ActivePage.Shapes("Sheet.1")
For x = 1 To 5
index = myListBox.AddItem(x)
Next x
End Sub"
This code gives me a type mismatch with AddItem highlighted:
"Private Sub alarmListBox_Click()
Dim index
Dim x
For x = 1 To 10
index = alarmListBox.AddItem(x)
Next x
End Sub"
I am not very skilled at this sort of thing but I can usually muddle
through. However I can't seem to get this to work.
Thanks for your help
jph