Auto Highlight selected field on userform

cmxulb

Board Regular
Joined
Nov 24, 2020
Messages
52
Office Version
  1. 365
Platform
  1. Windows
Hello,
How can you auto higlight selected field on userform?

So basicly I need this line to be highlighted (Me.lstDatabase.TopIndex = Me.lstDatabase.ListCount - 1)


ListBox1.BackColor = RGB(153, 153, 255) ??????
VBA Code:
[CODE=xls]
[/CODE]
 
In that case is you listbox multi or single select?
 
Upvote 0

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Then the last item in the listbox should be selected & highlighted.
 
Upvote 0
Correction, it not selecting it just scroll to the last item entered
 
Upvote 0
Have you tried the code I suggested?
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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