I have a workbook with many worksheets and hundreds of checkboxes, toggles, etc.
Somewhere in the code I have inherited
"FlashCopy_chkbox.Enabled = False"
doesn't work. I need to find WHERE that checkbox/toggle is in a previous version of the same file.
Simply put, how to I use vba to select whatever that is referencing and center it on my screen?
The following code will list all ActiveX controls on all sheets in a workbook in the
Immediate
window of the VBE. Furthermore, the code will list all form controlOptionButtons
,CheckBoxes
, andButtons
on all sheets:Let me know if you have any questions.
You can not just call a control on a worksheet directly from outside of the worksheets module. Is
FlashCopy_chkbox
declared somewhere in your script?Set FlashCopy_chkbox = Worksheet("Sheet1").FlashCopy_chkbox
.In any case this will find it.
I understand you were looking for a built in method but In the future please post some code. Stack Overflow is here to help improve existing code.