When the file opens from the desktop, a compile error message is generated saying that the' method or data method not found.' pointing to Textbox1 in blue
and the Listbox1 line highlghted in yellow. See image below. However, both Listbox1 and Textbox1 are present on the sheet. They are jut hidden until
the View data button is clicked
Yet they both become visible and work perfectly when the View data button is clicked with this code when the sheet is active:
How can this be? Why is Excel saying that the 'method or data member not found' when it is definitely present and clearly visible on the sheet ? I tried making both
visible to see if the visible property was generating the error, and the same result: 'method or data member not found --->pointing to Textbox1.
There is Textbox1 in the image on the right of Listbox1 below.
Googling tells to find and delete a file called MSForms.something to get it to work. Why should anyone have to delete any Excel files to
get Excel to work properly? I've never heard of this before!
Please help if you can. Thanks, cr
and the Listbox1 line highlghted in yellow. See image below. However, both Listbox1 and Textbox1 are present on the sheet. They are jut hidden until
the View data button is clicked
Code:
Me.Listbox1.visible = false
Me.Textbox1.visible = false
Yet they both become visible and work perfectly when the View data button is clicked with this code when the sheet is active:
Code:
Private Sub cmdVISIBLE_Click()
Me.ListBox1.Visible = True
Me.TextBox1.Visible = True
Me.TextBox1 = Me.ListBox1.List(Me.ListBox1.ListIndex, 1)
End Sub
visible to see if the visible property was generating the error, and the same result: 'method or data member not found --->pointing to Textbox1.
There is Textbox1 in the image on the right of Listbox1 below.
Googling tells to find and delete a file called MSForms.something to get it to work. Why should anyone have to delete any Excel files to
get Excel to work properly? I've never heard of this before!
Please help if you can. Thanks, cr
Attachments
Last edited: