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
Property or method not found
Property or method not found
OOo 3.1.X on Ms Windows XP
-
- Volunteer
- Posts: 1160
- Joined: Mon Oct 08, 2007 1:26 am
- Location: France, Paris area
Re: Property or method not found
Hi,
Programming questions should be posted in the Macros forum or one of its sub-forums.
Use the Code button to enclose your code lines.
Programming questions should be posted in the Macros forum or one of its sub-forums.
Use the Code button to enclose your code lines.
Re: Property or method not found
Use Doc = ThisComponentDoc = StarDesktop.CurrentComponent
StarDesktop.CurrentComponent when the macro is run from the Basic IDE is the IDE. ThisComponent is always the active document.