EBDN - Community - Question & Answers

  Wednesday, 03 July 2019
  1 Replies
  1K Visits
0
Votes
Undo
There is no objectItem of the following worksheet with filter.

Dim oFilter As Filter

oEuipWorksheet.Filter.Clear

Set oEuipWorksheet = oProject.EquipmentFolder.OpenWorksheetDirectEx(aucObjDevice, aucAttrMaterial, _
aucCondNotEqual, "", aucWorksheetOpenDeep, aucAttrMaterial)


With oEuipWorksheet.Filter
Call .Add(aucAttrDesignation, aucCondNotEqual, "";)
Call oEuipWorksheet.Refresh
End With


But there are objectItems of the following worksheet with filter.

Dim oFilter As Filter

Set oFilter = New Filter

oFilter.Kind = aucObjDevice

Call oFilter.Add(aucAttrMaterial, aucCondNotEqual, "";)
Call oFilter.Add(aucAttrDesignation, aucCondNotEqual, "";)

Set oEuipWorksheet = oProject.EquipmentFolder.OpenWorksheetWithFilter(oFilter, aucWorksheetOpenDeep, aucAttrMaterial)


What is the problem with the first code?