I need macro click help

Hi All,

Calc 6.1.2.1

Can someone point me to an example or a how to of how to automate a series of clink functions (press this, press that, enter this, click that, etc.) with Macros?

Many thanks,
-T

http://bit.ly/faithalone. No password needed, just unlock, many buttons, formula’s and simple macros. I learned much from reading questions here, and asking a few! For Blue Macro Button’s to work, or even to look at macro’s, you will need to set macro’s at Medium, in Tools/Option, LibreOffice/Security…Macro Security… Medium… (These Macro Buttons are safe) Then close the file, and reopen.

That has a lot of neat stuff in it. How do I read the contents of a cell?

I wrote myself a test:

Sub GetCellValueTest
   Dim Sheet
   Dim D2
   Dim F5
   Dim C4
   Dim RtnCode As Integer
   
   rem assign a tab (sheet)
   Sheet = thiscomponent.sheets.getByName("Jump Log")
   
   rem get the position of "$D$2"
   D2 = Sheet.getCellRangeByName( "$D$2" )
   
   rem print oCell.value, oCell.string, oCell.formula, oCell.FormulaLocal, oCell.Error
   print D2.string, D2.value
   
   
   rem get the position of "$F$5"
   F5 = Sheet.getCellRangeByName("$F$5")
   
   rem write D2's string value to F5's position
   F5.setString( D2.string + " abc" )

   rem re-get "$F$2" after is hasw been overwritten
   F5 = Sheet.getCellRangeByName("$F$5")
   RtnCode = MsgBox( F5.string + "    ", 0, "Cell Value" )
   
   C4 =  Sheet.getCellRangeByName("$C$4")
   RtnCode = MsgBox( C4.string + "    ", 0, "Oh No!" )

End Sub