Page 1 of 1

[Solved] Create and run a Window Dialog

Posted: Tue Nov 27, 2007 11:23 am
by luigiv
Hello,
The problem is: I want to create a window dialog in OpenOffice.org 2.3 Calc and show it when I press a Button on a Sheet.
I have read a guide: "StarOffice 8 Programming Guide for BASIC" and I have use the following code :
Dim Dlg As Object
DialogLibraries.LoadLibrary("Standard")
Dlg = CreateUnoDialog(DialogLibraries.Standard.DlgDef)
Dlg.Execute()
Dlg.dispose()
but it doesn't work.
My window dialog name is Dialog1
Can you help me?
Thank you.

Re: Create and run a Window Dialog

Posted: Tue Nov 27, 2007 1:35 pm
by probe1
luigiv wrote:My window dialog name is Dialog1
so, you have to load that dialog:

Code: Select all

Dlg = CreateUnoDialog(DialogLibraries.Standard.Dialog1)
Does this work for you?

Re: Create and run a Window Dialog

Posted: Tue Nov 27, 2007 6:49 pm
by luigiv
so, you have to load that dialog:

Code: Select all
Dlg = CreateUnoDialog(DialogLibraries.Standard.Dialog1)


Does this work for you?
Yes, it works! :D
Thank you!!!