Excel VBA / ComboBox ShowDropButtonWhenNever not working..?

Young Grasshopper

Board Regular
Joined
Dec 9, 2022
Messages
58
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi guys,

This is a purely aesthetic problem, so not a huge deal, but a annoying one..
I have this userform with a combobox. The combobox's Back- and bodercolor are transparent, since i have a image behind it, becaouse I want to make it look like your clicking the image to open the dropdown.
Combobox is set to StyleDropDownList and the Drop button is set to never show. However, everytime I actually i click on the combox, the backcolor in itself stay transparent, but the drop button appears!
Also, i get the "write-here-animation-line" appears inside the combobox.. This kinda ruins the clean design of the userform.

Is this a known problem, a bug, or have I just misunderstood the consept of "never show"?
Any other smart ways to solve this? I've tried just putting the combobox behind the image, but then i have the obvious problem of not being able to click on it..

Thank you:)
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
The style property should be frmStyleDropDownCombo (2).
Then perhaps triggering the dropdown action in the Enter and MouseDown event procedures?

VBA Code:
Private Sub ComboBox1_Enter()
    ' The control has focus by Tab key
    ComboBox1.DropDown
End Sub

Private Sub ComboBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    ' The control has focus by mouse click, or user wanted to select another option while the control still has focus
    ' Enter event is also triggered but only when the control has no focus already, that's why I needed this
    ' Preferably, I can avoid this necessity by simply setting focus on the next control in ComboBox1_Change event procedure.
   ' to make sure triggering the Enter event on the next selection.
    ComboBox1.DropDown
End Sub

1680912726083.png
 
Upvote 0

Forum statistics

Threads
1,215,159
Messages
6,123,351
Members
449,097
Latest member
thnirmitha

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