Rubberduck icon indicating copy to clipboard operation
Rubberduck copied to clipboard

"Variable is used but not assigned" error when using a (predeclared) form control

Open interservices opened this issue 2 years ago • 0 comments

Version 2.5.2.5906 OS: Microsoft Windows NT 10.0.22000.0, x64 Host Product: Microsoft Office x64 Host Version: 16.0.15225.20288 Host Executable: EXCEL.EXE

If I create a form control like a checkbox called oCheckBox in a sheet, I use it in the same sheet module like this: oCheckBox.value = False RD gives a "Variable is used but not assigned."

It doesn't give the error if I use the explicit form: Me.oCheckBox.value = False

interservices avatar Jun 27 '22 15:06 interservices