How to determine last row used and set a named range for a cell in that row
GregChi <geardoc36@snet.net>; asked a similar question on users@openoffice.org
and received workarounds more than a direct answer. I had a similar problem and after
reading Andrew Pitonyak's "Useful Macro Information for OOo" and asking a few questions
on dev@api.openoffice.org, wrote a macro which does the job. It considers col. F as the one
containing a formula to determine current account balance (i.e. previous balance , plus credit,
minus debit). Col. headings (A to F) are: Date, Value_date, Description, Debit, Credit, Balance).
Once you have copy pasted the code in your Calc file, you can well assign the macro
(_0_create_last_bal) to the Event/Opening of document so that it is run when the file
is opened. A second macro (create_last_bal) mentioned in the dialog box, does the same
as it just calls the previous one.