![Wink ;-)](./images/smilies/icon_wink.gif)
I start a new Calc, I add following lines under "organize macros/Openoffice.org-Basic.../Unlitled1/standard/new", and get the error "Property or method not found" as soon os I want to step over " Sheet = Doc.Sheets.getByName("Sheet1") "
I also tried " Sheet = Doc.Sheets(0) " with same problem ! What am I doing wrong?
Sub sTest
Dim Doc As Object
Dim Sheet As Object
Dim CellRange As Object
Doc = StarDesktop.CurrentComponent
Sheet = Doc.Sheets.getByName("Sheet1")
CellRange = Sheet.getCellRangeByName("A1:C15")
End Sub