OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Macro recording - Auto filter is not working

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
mmy
General User
General User


Joined: 17 Jun 2009
Posts: 7

PostPosted: Wed Jun 17, 2009 10:34 pm    Post subject: Macro recording - Auto filter is not working Reply with quote

i try to record macro for auto filter data in table, but macro is not working,


sub filter1
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:DataFilterStandardFilter", "", 0, Array())

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FilterExecute", "", 0, Array())

rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "ToPoint"
args3(0).Value = "$E$15"

dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args3())


Any body can help me
Back to top
View user's profile Send private message MSN Messenger
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Thu Jun 18, 2009 12:35 am    Post subject: Reply with quote

Hello

You cannot record a macro for a database search action. AFAIK

Do search for : search sub
select searching for both
Select forum database.

But I must warn when you start with macros you have to study several manuals.

search link

Tutorial from Benitez.
This tutorial is good for understanding the forms.

Romke
Back to top
View user's profile Send private message
mmy
General User
General User


Joined: 17 Jun 2009
Posts: 7

PostPosted: Thu Jun 18, 2009 1:22 am    Post subject: Reply with quote

thanks for your comments , I am new for open office. can u give more solution for this
Back to top
View user's profile Send private message MSN Messenger
mmy
General User
General User


Joined: 17 Jun 2009
Posts: 7

PostPosted: Thu Jun 18, 2009 1:25 am    Post subject: i need run this macro on calc Reply with quote

i need run this macro on calc,
Back to top
View user's profile Send private message MSN Messenger
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Thu Jun 18, 2009 1:29 am    Post subject: Reply with quote

All I can tell about writing macros on spreadsheet filters, including example code, all the relevant links to the API reference and keyword "FilterDescriptor" for further reference: http://www.oooforum.org/forum/viewtopic.phtml?t=84589&highlight=filterdescriptor

What I will never understand: Why does anybody need the help of a macro to apply a simple auto-filter?
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
BrizPete
General User
General User


Joined: 18 May 2009
Posts: 17

PostPosted: Thu Jun 18, 2009 1:50 am    Post subject: Reply with quote

Villeroy wrote:
....
What I will never understand: Why does anybody need the help of a macro to apply a simple auto-filter?


Perhaps we could start a poll? Very Happy

Essentially, I think 'users' are used to being spoon-fed. They want the information with a click of a button, they even want you to provide the info via telepathy and are reluctant to answer ANY questions.

Hence, they want 27 seperate buttons for "Select records beginning with 'A'", "Select records beginning with 'B'"..........."Select ALL records" etc rather than having to answer the question "What letter do you want?".

On the serious side, I believe that there is a reluctance to have any 'unprotected' fields on a screen. The mindset is that users must be locked into certain actions.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Thu Jun 18, 2009 2:23 am    Post subject: Reply with quote

Quote:
On the serious side, I believe that there is a reluctance to have any 'unprotected' fields on a screen. The mindset is that users must be locked into certain actions.

So we need a complete programming environment on top of every application (plus automatic code generation) to turn every swiss knife into any kind of chain saw you like.
This concept is rather outdated like anything else that does not comply to any standards other than it's own interfaces.
Luckily, OOo has not the developer resources to accomodate users who don't want to use and programmers who don't want to program.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
mmy
General User
General User


Joined: 17 Jun 2009
Posts: 7

PostPosted: Thu Jun 18, 2009 6:31 am    Post subject: Reply with quote

MS Exel

autofilter coding

Sub Filter()
'
' Filter Macro
' Macro recorded 6/22/00 by Mr. Kanishka
'

'
Selection.AutoFilter Field:=5, Criteria1:="<>"
End Sub

i need the same thing from the open office,

i am new for open office thats Y i am comparing to MS office.
in ms office this is very easy thing.
Back to top
View user's profile Send private message MSN Messenger
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sat Jun 20, 2009 3:17 am    Post subject: Reply with quote

Quote:
i need the same thing from the open office,

i am new for open office thats Y i am comparing to MS office.
in ms office this is very easy thing.

This is exactly the attitude which makes me running up the wall.
If this is such a simple thing, then get your ass up and add the feature to this office suite. The code base of OOo is free by any means.
Oh, you can not program at all? Nevertheless, you want to impress your boss with automated single-click actions? Well, in this case you will never ever use any software other than the one you know already (until MS drops the VB-languages completely).
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3655
Location: Columbus, Ohio, USA

PostPosted: Sat Jun 20, 2009 3:39 pm    Post subject: Reply with quote

Try this

http://www.pitonyak.org/database/Calc_As_A_Simple_Database.odt

The WIKI version begins here:

http://wiki.services.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Calc_as_a_Simple_Database

You probably want to click on Filters in the upper right corner.
_________________
--
Andrew Pitonyak
http://www.pitonyak.org/oo.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
MrBill1028
General User
General User


Joined: 13 Sep 2008
Posts: 15
Location: COLORADO

PostPosted: Mon Jul 06, 2009 5:21 am    Post subject: NEW USERS Reply with quote

Villeroy I'm very surprised at your response to this post. Crying or Very sad You have helped many in the past and I'm shocked at the tone I see in this post. Thank you Andrew for once again point us newbies in the right direction. Yes this is a learning experience for all, and remember people learn in different ways. Thanks to all here in the Forums that have helped me in the past.
_________________
Rank Amateur Willing To Learn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group