Create Control at runtime

V

vbaNOOB

Hi

Am I able to create controls (for example: combox box) at runtime?
if possible, how can I do it ?

Thanks
 
H

Helmut Weber

Hi,

like this:

Selection.FormFields.Add _
Range:=Selection.Range, _
Type:=wdFieldFormDropDown
' or
Selection.InlineShapes.AddOLEControl _
ClassType:="Forms.ComboBox.1"

Try the macrorecorder.
and define a range instead of using the selection.
 

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