VBA access to Drop Down list Selection

D

Dan Morton

Have a form that I've used VBA to implement calculation in. With text entry
fields I've been able to get the results I'm looking for. However for some
fields I used a dropdown list to control input. Cannot for the life of me
figure out how to access what item in the dropdown list has been selected.
Any hints/sample code or urls where this issue is discussed would be
appreciated.
Thanks
Dan
 
H

Helmut Weber

Hi Dan,

if your dropdownlist is formfield(1),
then
msgbox activedocument.formfields(1).result

Or am I missing something?

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
 
A

Anand.V.V.N

Hi Dan,

you usign a combobox or a list box. Either way there is a property text,
which gives the currently selected text.

I hope this is what you were looking for

Anand
 
D

Dan Morton

My dropdown box had Bookmark set to Day1Obj1Grade
dim str as string

str = ActiveDocument.Formfields ("Day1Obj1Grade").result

Got me the result in a variable I could use.

thanks for pointing me in the right direction.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top