ComboBox move and size

T

Tarun Gupta

When you right click on a comboBox in an excel spreadheet, you get a
"Format Object" option. Clicking on it opens up a window that lets you
set some properties for that control. If you go to the properties tab
then, it allows to select whether you want to move and size the
comboBox along with the cell in which it is contained. Is it possible
to set this property dynamically for a combo box through VBA code? i
am adding comboBoxes dynamically and would like to set this property
to "Move and size with cells".

Thanks
Tarun
 
D

Doug Glancy

Tarun,

This works for one from the Controls Toolbox:

ActiveSheet.OLEObjects("ComboBox1").Placement = xlMoveAndSize

hth,

Doug Glancy
 

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