Question on getting a list of all the macro commands

classic Classic list List threaded Threaded
1 message Options
Michael D. Setzer II-2 Michael D. Setzer II-2
Reply | Threaded
Open this post in threaded view

Question on getting a list of all the macro commands

Does a file with them exist in full or part.
Was recently looking thru menus and found something interesting that I
had not noticed before.
Data / Calculate / Formula to Value

I did a test, and it did what I wanted, so recorded the macro.
Strangely, the command to do the Formula to Value was there, but it had
rem in front of it, so macro would not work as recorded. Removed the
rem, and it worked fine?? So, this can duplicate the F9 Enter option for
some things.

sub xx12
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("")

rem ----------------------------------------------------------------------
rem ----------------------------------------------------------------------
dim args1(0) as new
args1(0).Name = "StringName"
args1(0).Value = "=sum(k2:k57)"
dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, args1())
dispatcher.executeDispatch(document, ".uno:ConvertFormulaToValue", "", 0, Array())
end sub

My main macro in this sheet takes a set of data from a web site. that is placed in a2:o64.
Only need data in a2:d64 and the total of data in K2;K57. So, macro delete columns E to O.
But need to save total of K2:K57. Had been entering formula manually, and using F9 to convert it.
Just need to put this code in main macro to automate how process to the macro I have linked to
Shift-F4. Updates covid data from 50 states, D.C., and 5 Territories.. So, run it as data changes.
Perhaps there are lots of other such processes outthere.
Still find it strange that the recorder recorded it, but did it as a remark??

Thanks again..

To unsubscribe e-mail to: [hidden email]
Posting guidelines + more:
List archive:
Privacy Policy: