Quirk selects invisible ComboBox when clicking nearby visible Command Button

AnthK

New Member
Joined
Nov 1, 2022
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Hi everyone.
I have an issue that I have been trying to figure out and it seems to be a bug in excel maybe?

So I have a userform which displays a heap of data from a Table that is located on a worksheet.
The user selects a record through a series of ComboBoxes.
Once chosen - those ComboBoxes are made invisible and the data is displayed (other controls become visible)
The data includes command buttons which will allow the user to click to select a new related record.
The command button essentially reloads the data in the ComboBoxes while they are invisible to display the new record.
The only issue is that when the new record is displayed - the invisible ComboBox that was located on top of the command button will be displayed with its selected value.
I then need to click somewhere on the userform to get it to disappear.

So I assume that there is something going on here due to the Z-order given that the controls occupy the same space on the form but I would have thought that being invisible - the control shouldn't be able to be displayed?

If anyone has any previous experience with this or thoughts I would love to hear!

Thanks,

Anthony
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Sorry I should clarify - when I say that the invisible ComboBox is displayed - it only displays the currently selected item from the listbox component. The textbox component and all other entries of the listbox are not visible - just the element that has (for example) ComboBox1.Selected(4) = True.
I have forced the visible property = true then false but all that happens is it displays the rest of the ComboBox then hides it again - still with the selected value!
 
Upvote 0

Forum statistics

Threads
1,224,742
Messages
6,180,684
Members
452,993
Latest member
FDARYABEE

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