Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SDETERS 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
Sep 19, 2007
1
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.
 
Replies continue below

Recommended for you

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