Dialog not showing

https://help.libreoffice.org/6.2/en-US/text/sbasic/guide/show_dialog.html

Hi

There are two options on above link to create a dialog and show. These should work as it ? There should be a standard dialog pop up - Dialog1 ?
Or do I have to create a dialog first.
Macro1 gives message: An exception occurred… ./basic/source/uno/namecont.cxx:118
Macro 2 gives message : Property or method not found. Dialog1
No dialog showing as yet.

Comments please

Charles

Yes, you need create Dialog1 first.

Sub Dialog1Show()
    GlobalScope.BasicLibraries.LoadLibrary("Tools")
    oDialog1 = LoadDialog("Standard", "Dialog1", DialogLibraries)
    oDialog1.Execute()
End Sub

image

Have got a Dialog1 now. Still same result. Same message.
DialogOnly.ods (9.5 KB)

Any settings in libre Calc that would cause this?

Thanks
Charles

On a 15" laptop screen. Is there any positioning required for it to show?
Charles

As you can see the Standard library is installed . Any others needed. Is there a tool bar for libraries with options? Get the message cxx 118 on similar macros, all referring to libraries, Are the libraries not installed correctly or enabled? Can not be much wrong!X
Thanks

@sswcharlie: compare

and

Sub Dialog1Show
    BasicLibraries.LoadLibrary("Tools")
    oDialog1 = LoadDialog("Standard", "Dialog1")
    oDialog1.Execute()
End Sub

Try to spot any differences, and then think if it’s useful to test the code as it’s suggested, and only then assume that some part of it aren’t needed.

1 Like