Porque aparece esse erro abaixo e depois que aparece o erro depurar, depois disso o arquivo em Excel fecha e não funciona, mais quando outra pessoa me envia o mesmo arquivo ao abrir ele funciona normal., erro digitado em vermelho abaixo.
Private Sub cboShop_Change()
Dim Plant As Plant ' Base of object structure returned from ReadPlantStructure...
Dim JobList As Collection, JobElementList As Collection, ZoneDiagramList As Collection ' WorkstationList As New Collection,
If Enable_Events = True Then
Enable_Events = False
PopulateDepartmentList cboDept, dbinfo, cboShop.Value
PopulateGroupList cboGroup, dbinfo, cboShop.Value, cboDept.Value
ReadPlantStructureToGroup dbinfo, CStr(Me.cboPlantConfig), CStr(Me.cboShop), CStr(Me.cboDept), CStr(Me.cboGroup), Plant
ReadWorkstations dbinfo, CStr(Me.cboPlantConfig), CStr(Me.cboShop), CStr(Me.cboDept), CStr(Me.cboGroup), Plant, ListOfWorkstations
SetUpProgressBar Me
PopulateOperationListFromObjects ListOfWorkstations, lbxOperation, dbinfo, cboShop.Value, cboDept.Value, cboGroup.Value, tbxOperationAddressFilter, tbxOperationNameFilter, CStr(DefaultWorkstationID)
Set ListOfWorkstations = ReadJobsByWorkstation(dbinfo, CStr(Me.cboPlantConfig), CStr(Me.cboShop), CStr(Me.cboDept), CStr(Me.cboGroup), CStr(Me.lbxOperation), ListOfWorkstations, lbxJob.Text, JobList, Plant, JobElementList, ZoneDiagramList, Me, LoadMajorSteps:=True, LoadSTD:=True)
HideProgressBar Me
PopulateJobListFromObjects Me.lbxJob, ListOfWorkstations(lbxOperation.Value), Me.txtJobFilter, DefaultJobID '@@@@
' If no Jobs are returned for the given PC/Shop/Dept/Group/WS, clear the Job Element and Detail lists
If IsNull(lbxJob.Value) Then
Me.lbxJobElement.Clear
Else
' ReadJobElements DBInfo, CStr(Me.cboPlantConfig), CStr(Me.cboShop), CStr(Me.cboDept), CStr(Me.cboGroup), CStr(Me.lbxOperation), ListOfWorkstations, CStr(Me.lbxJob), JobList, JobElementList, Me, LoadMajorSteps:=False, LoadSTD:=False, LoadPartLinks:=True
' PopulateJobElementList lbxJobElement, ListOfWorkstations, cboShop.Value, cboDept.Value, cboGroup.Value, lbxJob.Value, tbxJobElementFilter.Value
PopulateJobElementListFromDB Me.lbxJobElement, Me.lbxJob.Value, tbxJobElementFilter.Value, Me.lbxJobElement.Value, dbinfo
End If
Enable_Events = True
End If
End Sub