Property or method not found
Posted: Mon Dec 03, 2007 10:00 am
Well I'm new to programming OO, comming from Excel/VBA 
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

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