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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
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,214,951
Messages
6,122,449
Members
449,083
Latest member
Ava19

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