ich möchte in OO 1.1.5 ein Dialog öffnen mit den Namen der einzelnen Sheets. Allerdings bekomme ich in die ListBox mein Array nicht rein.
Code: Alles auswählen
Sub Main
'Sheets Auslesen
myDoc = thisComponent
Anzahl = myDoc.Sheets.count
Dim SheetNames(1) As Variant
For x = 0 To Anzahl - 1
mySheet = myDoc.Sheets(x)
ReDim Preserve SheetNames(x) As Variant
SheetNames(x) = mySheet.Name
'MsgBox(SheetNames(x))
Next x
For x = 0 To UBound(SheetNames())
If SheetNames(x) = "Einstellungen" Then
'ArrayDelete(SheetNames(), x)
End If
'MsgBox(SheetNames(x))
Next x
Dim oDialog1 As Object
Dim oListBox1 As Object
oDialog1 = LoadDialog("Standard", "DlgAuswahl")
oListBox1 = oDialog1.getControl("test")
oListBox1.Items = SheetNames()
'GlobalScope.BasicLibraries.LoadLibrary("Tools")
'WriteDbgInfo(oListBox1)
'MsgBox(oDialog1.dbg_properties)
oDialog1.execute
End Sub
Jetzt komm ich einfach nichtmehr weiter.
Gruß Thorsten