If this compiles, it should work at run time, if not, maybe the event is pfc_filter and not ue_filter or your sheet is not inherited from w_sheet
w_sheet lwin
lwin = w_mdi_window.GetActiveSheet ()
if isValid ( lwin ) then
lwin.EVENT POST ue_filter()
end if