Ich habe eine benutzerdefinierte Funktion erstellt:
Code: Alles auswählen
Function POLYVAL(x, myrow)
Dim NumValues As Integer
Dim Doc As Object
Dim Sheet As Object
Dim Cell As Object
Doc = StarDesktop.CurrentComponent
Sheet = Doc.Sheets(0)
Cell = Sheet.getCellByPosition(myrow, 2)
NumValues = Cell.Value
POLYVAL = 3
End Function
Offenbar darf man "getCellByPosition" nicht während der Initialisierung eines Dokumentes benutzen. Aber woher kann denn meine Funktion wissen, ob das Dokument schon vollständig initialisiert ist oder nicht?basic runtime error - object variable not set
Danke für Eure Hilfe!
Sabine Lorentz