# Revision history [back]

I think that you can do it with calling uno commands via dispatcher.

The recorded macro is (all rem removed):

sub RefreshAdvancedFilter
dim document   as object
dim dispatcher as object
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "DbName"
args1(0).Value = "Quelle"
dispatcher.executeDispatch(document, ".uno:SelectDB", "", 0, args1())
dispatcher.executeDispatch(document, ".uno:DataAreaRefresh", "", 0, Array())
end sub


I have called my data source range "Quelle" and set the filter to "Keep filter criteria". The cursor is moved to the top left cell of the data source range. You might need to add parts to remember the old position and set the cursor back.

You can generate a button in a toolbar to execute the macro. That is done in Tools > Customize. Or you assign the macro to the "mouse button pressed" event of an object, a button or picture for example.