Visio Guy

Visio Discussions => Programming & Code => Topic started by: suhaspatil3007 on November 09, 2011, 04:18:27 AM

Title: Add combobox using visPropTypeListFix to visSectionProp (i.e. shape data) secti
Post by: suhaspatil3007 on November 09, 2011, 04:18:27 AM
i want add combo box in property secion shape
i.e  add  combo box using

  Shape.AddNamedRow visSectionProp, "RequiredProperty", visPropTypeListFix

but it giving me error not supported by property type
i am using VBA
Any clue on how to add this combo in property section?
Title: Re: Add combobox using visPropTypeListFix to visSectionProp (i.e. shape data) secti
Post by: Jumpy on November 09, 2011, 07:22:47 AM
There is only one type of rows in the property section so your 3rd parameter can only be visTagDefault (=0).
(An example of a section, where there are different types of rows would be Connection Points).

So:

  Dim myList as String
  myList = "Item1;Item2;Item3"

  Shape.AddNamedRow visSectionProp, "RequiredProperty", visTagDefault
  If Shape.CellExists("Prop.RequiredProperty",false) Then
    Shape.Cells("Prop.RequiredProperty.Type").Result("")=visPropTypeListFix
    Shape.Cells("Prop.RequiredProperty.Format").Formula=CHR(34) & myList & CHR(34)
  End If