Search code examples
excelvbaopenedgeprogress-4gl

Using autofilter on excel sheet in Progress 4GL


I have some issue about Autofilter a range of cells on an Excel sheet.

the part of the code: vchWorkSheet:Range(XLS_col(1) + STRING(2) + ":" + XLS_col(vi_x) + STRING(2)):Autofilter.

where: XLS_col(1) - the actual column (for example: "A"), vchWorkSheet - the actual worksheet, Range(XLS_col(1) + STRING(2) + ":" + XLS_col(vi_x) + STRING(2)) - the range of cells (for example: "A2:BB2")

I've got an error message when building app: "Wrong number of parameters. Component method Autofilter called with < 3 parameters."

Actually I would like to use only VisibleDropDown parameter, nothing to filter in default.

Error message here

Any idea?

I've tried to add some parameters (for example: vchWorksheet:Range("A2:BB2"):Autofilter:VisibleDropDown = TRUE., or: vchWorksheet:Range("A2:BB2"):Autofilter(,,,,,TRUE).), but i don't know the syntax of Autofilter arguments.

I would like to display filter option on the range


Solution

  • I tried to use vchWorksheet:Range("A2:BB2"):Autofilter(?,?,?). and it solved my problem, so I just used 3 null parameter (:Autofilter(?,?,?)) and now the filters are displayed on the range.