First time posting here. I have been down da rabbit hole for the past few days, very exciting, advance filters and macor magic. I have an advanced filter in a named range on one sheet. It filters another named range on another sheet. If I apply the advance filter via the menu data > more filters > advanced filters, there is an option to turn on regular expression and when I do that it works fine. When I use my macro, the regular expressions are not turned on. They are positively frigid. How do I turn on the regular expressions in my macro? My macro is a mutation of the one on page 512 here https://www.pitonyak.org/OOME_3_0.pdf (open office macro’s explained by Andrew Pitonyak)
Sub AdvancedRangeFilter()
Dim oSheet 'A sheet from the Calc document.
Dim oRanges 'The NamedRanges property.
Dim oCritRange 'Range that contains the filter criteria.
Dim oDataRange 'Range that contains the data to filter.
Dim oFiltDesc 'Filter descriptor.
REM Range that contains the filter criteria
oSheet = ThisComponent.Sheets.getByName(“sheetFiltersAreHere”) REM the filters are on this sheet
oCritRange = oSheet.getCellRangeByName(“FilterByMe”) Rem the filters are in a named range and expression
REM The data that you want to filter
oSheet = ThisComponent.Sheets.getByName(“ToBeFilteredIam”)
oDataRange = oSheet.getCellRangeByName(“RangeToBeFiltered”)
oFiltDesc = oCritRange.createFilterDescriptorByObject(oDataRange)
oDataRange.filter(oFiltDesc)
End Sub