I'm new to programming, i have a dialog with a label as my main text and a checkbox with label "Don't display this again.".
So I want that when the document is open, it loads the dialog, and if user checks the checkbox, it won't load again.
I'm trying the code below but obviously it doesn't work because when the sub starts, display is set to true.
Code: Select all
Sub demo
Dim display As Boolean
DialogLibraries.LoadLibrary("Macros")
dlgDemo = CreateUnoDialog(DialogLibraries.Macros.dlgDemo)
chbShow = dlgDemo.getControl("chbShow")
display = true
If display Then
dlgDemo.Execute()
End If
If chbShow.State = 1 Then
display = false
End If
End Sub
I would appreciate some help, as I said, I'm new to programming and I'm always getting stuck.