combobox list

bam12

Well-known Member
Joined
Dec 6, 2004
Messages
984
I have a user form with a combobox with a list of about 20 items. When I run the macro it it always has an item hilighted in about the center of the list.

Is there code i can put in to keep the hilight bar always at the top of the list

thanks for any help
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
bam12,
bam12 said:
When I run the macro it it always has an item hilighted in about the center of the list.
seems to me you've some code which is doing this
what's the code you're currently using ?
would this help ?
Code:
Private Sub UserForm_Initialize()
ComboBox1.Value = ComboBox1.List(0)
End Sub

kind regards,
Erik
 
Upvote 0
code fro combobox

this is the code i have for the combobox

Private Sub combobox1_Click()
Range("h26") = ComboBox1
End Sub
 
Upvote 0
that's the code used when you click it, whic doens't have any influence on the selection
do you have code like I posted ? (Initialize)
please try also the code provided
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,853
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top