Listbox alternative where there is no drop down

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,717
Office Version
  1. 2007
Platform
  1. Windows
On a userform is there say a Listbox where you dont click the drop down or maybe a setting you can change so the results are just shown ?
Example like attched image

EaseUS_2024_10_26_15_45_11.jpg
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
When activate the userform:
VBA Code:
Private Sub UserForm_Activate()
  ComboBox1.DropDown
End Sub

When you mouse over the combobox
VBA Code:
Private Sub ComboBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
  ComboBox1.DropDown
End Sub

Or you can put the data in the listbox and it will always be visible 😅
 
Upvote 0
Is there a way to keep the ComboBox open.
I mean i have added the code as shown,
VBA Code:
Private Sub UserForm_Activate()
  ComboBox1.DropDown
End Sub

But when i click in a Textbox it closes,i understand it opens when form is activated.
I generally select the Textboxes first then towards the end make a selction from ComboBox

Thanks
 
Upvote 0
But when i click in a Textbox it closes,i understand it opens when form is activated.
I generally select the Textboxes first then towards the end make a selction from ComboBox

Put this instruction back also in the change event

ComboBox1.DropDown

Or like I said, to always make them visible, use a list box.

🧙‍♂️
 
Upvote 0
I used the same box so i didnt have to change lots of code.

If you mean like this its does the same thing & close when i click in a Textbox.

VBA Code:
Private Sub UserForm_Change()
NameForDateEntryBox.DropDown
End Sub
 
Upvote 0
Then like I said, to always make them visible, use a list box.
 
Upvote 0
I will look into it as I can get names into listbox but looking to see how to populate it with date & item purchased as shown in first post.
 
Upvote 0
I don't understand you.

Simply make your listbox larger so that all the items can be seen

1730143497885.png
 
Upvote 0
When I tried it wasn’t the up & down issue but left & right
Will look tomorrow
 
Upvote 0
So that the data is always visible, use a Listbox instead of a combobox.
Make the litbox taller and longer
:sneaky:
 
Upvote 0

Forum statistics

Threads
1,223,575
Messages
6,173,149
Members
452,503
Latest member
AM74

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