| View previous topic :: View next topic |
| Author |
Message |
mmy General User

Joined: 17 Jun 2009 Posts: 7
|
Posted: Wed Jun 17, 2009 10:34 pm Post subject: Macro recording - Auto filter is not working |
|
|
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 |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Thu Jun 18, 2009 12:35 am Post subject: |
|
|
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 |
|
 |
mmy General User

Joined: 17 Jun 2009 Posts: 7
|
Posted: Thu Jun 18, 2009 1:22 am Post subject: |
|
|
| thanks for your comments , I am new for open office. can u give more solution for this |
|
| Back to top |
|
 |
mmy General User

Joined: 17 Jun 2009 Posts: 7
|
Posted: Thu Jun 18, 2009 1:25 am Post subject: i need run this macro on calc |
|
|
| i need run this macro on calc, |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
|
| Back to top |
|
 |
BrizPete General User

Joined: 18 May 2009 Posts: 17
|
Posted: Thu Jun 18, 2009 1:50 am Post subject: |
|
|
| 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?
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 |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Thu Jun 18, 2009 2:23 am Post subject: |
|
|
| 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 http://forum.openoffice.org |
|
| Back to top |
|
 |
mmy General User

Joined: 17 Jun 2009 Posts: 7
|
Posted: Thu Jun 18, 2009 6:31 am Post subject: |
|
|
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 |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Sat Jun 20, 2009 3:17 am Post subject: |
|
|
| 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 http://forum.openoffice.org |
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3622 Location: Columbus, Ohio, USA
|
|
| Back to top |
|
 |
MrBill1028 General User


Joined: 13 Sep 2008 Posts: 15 Location: COLORADO
|
Posted: Mon Jul 06, 2009 5:21 am Post subject: NEW USERS |
|
|
Villeroy I'm very surprised at your response to this post. 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 |
|
 |
|