method or data member not found (1 Viewer)

option

Registered User.
Local time
Today, 17:27
Joined
Jul 3, 2008
Messages
143
Hey all,

I'm working with a spreadsheet that contains to combo boxes, one dependant on the other. Everything works, but when I close the spreadsheet, I get the error "method or data member not found", pointing to the dependant comob box. Now, I made sure the name was correct on the combo box and in the VBA code. I even changed the name to something completly different and replaced it in the VBA as well, but i still get the error. Here is my code, maybe someone can spot the error?
Code:
Private Sub cmbDept_Change()
On Error GoTo prcdErr
    
    If Me.cmbDept <> "" Then
        Call BuildProcessList(Me.cmbDept)
    Else
        Me.cmbProcess.ListFillRange = ""  [COLOR=Green]' this is highlighted on error[/COLOR]
    End If

prcdExit:
    Exit Sub
prcdErr:
    Call FatalError(Err.Number, Err.Description, Me.Name, "cmbDept_Change", False)
    Resume prcdExit
End Sub
 

chergh

blah
Local time
Today, 22:27
Joined
Jun 15, 2004
Messages
1,414
Try:

Code:
Me.cmbProcess.controlformat.ListFillRange
 

option

Registered User.
Local time
Today, 17:27
Joined
Jul 3, 2008
Messages
143
Hmm...now it's highlighting the
Code:
Private Sub cmbDept_Change()
part. Any ideas?
 

option

Registered User.
Local time
Today, 17:27
Joined
Jul 3, 2008
Messages
143
It's still "Method or data member not found".
 

option

Registered User.
Local time
Today, 17:27
Joined
Jul 3, 2008
Messages
143
Problem solved. I took the code and placed it on the updating of the combo box that was "missing".
 

Users who are viewing this thread

Top Bottom