Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Application.SendKeys "%{down}"
I am trying to get a combobox in a userform to open when it is selected
but cann't get it to work, here's what I was thinking... TextBox1.TabIndex = 1 TextBox2.TabIndex = 2 TextBox3.TabIndex = 3 TextBox4.TabIndex = 4 ComboBox1.TabIndex = 5 With ComboBox1 Application.SendKeys "%{down}" End With How can I get this to Work |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Application.SendKeys "%{down}"
Hello damorrison, You need to place the drop down command in the ComboBox's Enter Event. Double click the ComboBox on the UserForm. This will bring up the code window for the default event. In this case it is the Change Event. At the Top Right of the code window, you should see the word Change. Click the down arrow to see the other events. Scroll down to Enter in the list and click it. The editor should insert the following in the code window... Private Sub ComboBox1_Enter() End Sub Insert the following in between the above lines to trigger the Drop Down when the ComboBox is Selected... Application.SendKeys "^{F4}" Your code should look like this... Private Sub ComboBox1_Enter() Application.SendKeys "^{F4}" End Sub Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=546300 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Application.SendKeys "%{down}"
Do this:
ComboBox1.SetFocus Application.SendKeys "%{down}" |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Application.SendKeys "%{down}"
Thanks alot, works great
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|