Blockquote
Dim oClockDialog As Object
Sub ClockDialogShow
DialogLibraries.LoadLibrary(“Standard”)
oClockDialog = CreateUnoDialog( DialogLibraries.Standard.ClockDialog )
'X, Y, Width, Height, and a Flag allowing all parameters to be adjusted
oClockDialog.setPosSize(1350, 150, 400, 400, 5)
‘’’’’’’’’’’ View DateField1
'dim oDateField1 as object
'D=Now()
'oDateField1=oClockDialog.GetControl(“DateField1”)
'REM This gives a runtime error “Object variable not set”
’ oDateField1.Setdate(D)
'REM This has no effect on the value of the Date field in the control
’ oDateField1.Date.Day=Day(D)
'oDateField1.Date.Month=Month(D)
'oDateField1.Date.Year=Year(D)
'oDateField1.View.setText(D)
‘’’’’’’’’’’ ListBox1
For x = 0 to 20
oSheet = ThisComponent.Sheets.getByName(“Macros”)
oCell = oSheet.getCellByPosition(240, 1+x)
listVar = oCell.String
lstBox1 = oClockDialog.GetControl("ListBox1")
lstBox1.addItem(listVar,x)
Next
oCell = ThisComponent.Sheets(4).getCellByPosition(43,22)
oCell.String = lstBox1.getSelectedItem()
'oCell.String = lstBox1.SelectedValue
'oCell.String = lstBox1.SelectedText()
oClockDialog.Execute()
End Sub
Blockquote