PDA

View Full Version : Hide And Show a ComboBox



Damageplan
10-14-2005, 02:28 AM
Hello again http://vbaexpress.com/forum/images/smilies/039.gif,

is it possible to hide and show a ComboBox in a worddocument?
The ComboBox is direct in the worddocument, not in a UserForm!!

How it should work:
I have ComboBox1 with several entries in the document!
If the user clicks on one specific of these entries, another ComboBox(2) will appear on a bookmarked position elsewhere in the same document!
So there's only one specific entry in ComboBox1 on which ComboBox2 appears...on all other entries from ComboBox1 ComboBox2 must be hidden!

I hope that someone can help!

Thanks and cheers from germany!

Matthias

MOS MASTER
10-14-2005, 03:47 PM
Hi, :hi:

Can you post a sample doc of the progress you've made so far so we can have a look and see? :whistle:

fumei
10-14-2005, 11:17 PM
Two ways.

1. If you use formfields in the document. Use Hidden text for the second formfield. You must turn Show/Hide off though, and you must first turn off protect for foem, then turn it back on.

2. If you use ActiveX control comboboxes in the document. In many ways this is easier as the controls have more events to play with. These controls (unlike ActiveX controls on a UserForm do NOT have a .Visible properties. However, they DO have .Height and .Width properties. These can be set to very low values, making the control essentially so small it is almost impossible to see. This can then be nudged (if required) to just before the previous sentence end - to kind of hide them. They can be made as small as a period.

Actually, the more important consideration is...WHY are you doing this? Is there a reasonable explanation, or it is just a neat thing to do?