Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

setting ListBox properties in Visual Basic

Hi everyone,

      is there a way to set property [always one selected value] in one of my list Boxes via macro? (Visual Basic)

Thanks for any ideas!

1 Solution

Accepted Solutions
mato32188
Specialist
Specialist

Hi Lucka,

      sub AlwOneSelect

              set obj = ActiveDocument.GetSheetObject ("OB01")

              set boxfield = obj.GetField

              set prop = boxfield.GetProperties

if boxfield.GetFieldFlags.OneAndOnlyOne

              then

prop.OneAndOnlyOne = false

              else

prop.OneAndOnlyOne = true

        end if

boxfield.SetProperties prop

        end sub

BR

Martin

ECG line chart is the most important visualization in your life.

View solution in original post

1 Reply
mato32188
Specialist
Specialist

Hi Lucka,

      sub AlwOneSelect

              set obj = ActiveDocument.GetSheetObject ("OB01")

              set boxfield = obj.GetField

              set prop = boxfield.GetProperties

if boxfield.GetFieldFlags.OneAndOnlyOne

              then

prop.OneAndOnlyOne = false

              else

prop.OneAndOnlyOne = true

        end if

boxfield.SetProperties prop

        end sub

BR

Martin

ECG line chart is the most important visualization in your life.