Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA code for MS Word

Status
Not open for further replies.

Titouenne

Mechanical
Joined
Sep 19, 2007
Messages
1
Location
CA
I have a problem,

I wanna use the VB controls in a Word document (used as a form, but not quite) because i don't want to make my document available in a "protected" format.

So basically, i want to add a scrolling list in a document and be able to use the drop down button without having the document protected. It looks like the only solution is a "control" combobox. I tried to follow the instruction and i came up with the following code:

Private Sub ComboBox1_Change()
ComboBox1.List = Array("first","second","third")
End Sub

But it doesn't work.

Please help.
 
Hi Titouenne,

It's been a while since I've done anything with Word and VBA, but it seems to me you have to take the control out of "design mode" before it will work. You should hvae a small blue (maybe brown?) triangle somewhere near the controls toolbox - make sure it is "un-pressed".

HTH
Todd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top