The following VBA 6 in Excel 2000 code
Resides in a form that has text boxes, comboboxes and buttons
One of them is txtUsername, another is txtPassword
--I inherited this code
With shtName
.Unprotect "thepassword"
.range("somenamedrange").Value = cboComboBox.Value
.txtUsername.Text = txtUsername.Text
.txtPassword.Text = txtPassword.Text
...
End With
The code sets a text value for two worksheet objects that appear in the VBA Editor Object list, but are neither defined nor set anywhere else in the Excel Project. Option Explicit is used on all Microsoft Excel Objects, Forms and Modules. I can create procedures for said worksheet objects on said worksheet in the VBA Editor (e.g.,
Private Sub txtUsername_Change()
End Sub
Neither object
worksheet.txtUsername
worksheet.txtPassword
appears nor is set as a named range.
The value of both objects is only used elsewhere by specific reference worksheet.txtUsername.Text
These values do not show up in the locals window after they are set on the worksheet. They are definitely used, as the Essbase queries complete successfully using these objects.
summary:
i understand formName.txtUsername.Text (or .Value)
i do not understand a worksheet object that does not get defined nor instantiated via code
the only bright idea I had was to export the worksheet and view in a text editor, to see if my ancestors created a "custom" worksheet object the way one defines a "default property" in a class module--manually via text editor
(no mention of either property in the worksheet.cls)
Thank you.