I've seen a lot of this in the Forums, but it's hard to search on a specific error. I am having a problem with a spreadsheet using a ListBox. Here's my problem;
I have a ListBox on a worksheet called ReadMe. The beginning of my Macro look like this;
Sub CreateMFStuff()
Dim sLine As String
Dim sEmail As String
Dim sMFLog As String
Dim sMFPass As String
Dim sOutline As String
Dim FilePols As String
Dim sRange As String
Dim wsCurr As Worksheet
' Dim wsRead As Worksheet
Dim FSO As Object
Dim FSO2 As Object
Dim oFile As Object
Dim oFile2 As Object
Set wsRead = ActiveWorkbook.Worksheets("ReadMe")
For A = 0 To wsRead.ListBox1.ListCount - 1
If wsRead.ListBox1.Selected(A) = True Then
wsRead.Cells(x, 4).Value = wsRead.ListBox1.List(A)
x = x + 1
End If
Next
The declaration of the wsRead worksheet is commented out and the Macro works. If I un-comment it, I get the 'Method or Data Member Not Found' pointing to the '.ListBox1 area'.
Since I can comment it out, I'm good. I was just curious why it was happening.
Thanks
Bookmarks