2

What is the equivalent of

 Workbooks(ThisWorkbook.Name)

In libre office macro (StarBasic)

I would like to use Workbooks(ThisWorkbook.Name) like

below

 With Workbooks(ThisWorkbook.Name)

While (.Worksheets(ConstData.Detail).Range(ConstData.detailDtId + CStr(count)).Value <> 0)

//Some Code

Wend


End With

How to do this in Libre Office Calc Macro

4

1 回答 1

2

Open Office BASIC Guide 中的一个示例:

Dim Doc As Object
Dim Sheet As Object
Dim CellRange As Object

Doc = ThisComponent
Sheet = Doc.Sheets.getByName("Sheet 1")
CellRange = Sheet.getCellRangeByName("A1:C15")

MsgBox CellRange.computeFunction(com.sun.star.sheet.GeneralFunction.AVERAGE)

http://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Structure_of_Spreadsheets http://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Editing_Spreadsheet_Documents

于 2013-05-24T08:04:49.737 回答