ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to give combo box the focus (https://www.excelbanter.com/excel-programming/407544-how-give-combo-box-focus.html)

Nigel

How to give combo box the focus
 
I have seven combo boxes on a worksheet. After the code has run to add an
entry to the list I would like the next combo box to take the focus and so
on, preferably with a differentbackground colour if possible.

Thanks in advance
Nigel

Dave Peterson

How to give combo box the focus
 
Maybe you can use something like:

With Worksheets("Sheet1")
.ComboBox1.Activate
.ComboBox1.BackColor = &H80000002
End With



Nigel wrote:

I have seven combo boxes on a worksheet. After the code has run to add an
entry to the list I would like the next combo box to take the focus and so
on, preferably with a differentbackground colour if possible.

Thanks in advance
Nigel


--

Dave Peterson

Nigel

How to give combo box the focus
 
Hi Dave

I didnt realise it was that simple.

Thanks Nigel

"Dave Peterson" wrote:

Maybe you can use something like:

With Worksheets("Sheet1")
.ComboBox1.Activate
.ComboBox1.BackColor = &H80000002
End With



Nigel wrote:

I have seven combo boxes on a worksheet. After the code has run to add an
entry to the list I would like the next combo box to take the focus and so
on, preferably with a differentbackground colour if possible.

Thanks in advance
Nigel


--

Dave Peterson



All times are GMT +1. The time now is 05:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com