Is it possible to find the Worksheet where a ComboBox has been created, somethin
ID: 3563451 • Letter: I
Question
Is it possible to find the Worksheet where a ComboBox has been created, something like Me.ComboBox1.Worksheet.Name ??
It is an ActiveX ComboBox if it makes a difference.
I have had ComboBox events firing whenever I change values in its ListFillRange (which resides in another Worksheet) and I would llike to be able to see if my ActiveSheet is the same as the ComboBox sheet so that I bypass that event code.
I would like to be able to get the sheet name as a property in order to avoid specifying the name as a value in case the sheet name is changed.
Any suggestion???
Explanation / Answer
Hi,
try something like this...
(in a regular module)
Sub Find_ActiveX_cmbox()
Dim s As OLEObject
For Each sh In Sheets
For Each s In sh.OLEObjects
If s.Name Like "ComboBox*" Then
MsgBox s.Name & " in sheet " & sh.Name
End If
Next
Next
End Sub
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.