Thanks, I think I’m getting closer.
But I dodn’t fully understand your code…
oDialog.Visible=true
will display the form without stopping the execution, right ?
But I don’t understand :
if oDialog.execute=1 then
From what I could understand in my test, when I close the button on my “loader dialog”, the code restart after this “if”.
But in my case I don’t want to display the close button on this loader dialog, because its goal is to show something while the data is retrieved. So I don’t want the user to be able to close it himself.
Instead, I want this dialog to be closed after the data is retrieved, so I guess I will have to do :
oDialog.Visible=true
?
Actually I made a test and here’s what I did :
	DialogLibraries.LoadLibrary("Standard")
	
	oDialogLoader = CreateUnoDialog(DialogLibraries.Standard.frmLoader)
	oDialogLoader.Visible = True
	
   	oDialog = CreateUnoDialog(DialogLibraries.Standard.frmInsertGlossary)
   	oGlossaryList = oDialog.getControl("cmbGlossaryList")
   	
   	EmptyComboBox(oGlossaryList)
   	sGlossaryCodes = GetGlossaryCodesFromDatabase()
   	If UBound(sGlossaryCodes) = 0 Then
   		oDialogLoader.Visible = False
   		MsgBox "Impossible d'insérer un élément du glossaire !" & vbCrLf & "Le glossaire est vide...", vbExclamation, "Impossible de continuer"
   	Else
   		For iNbItem = 0 to UBound(sGlossaryCodes)
	   		oGlossaryList.addItem(sGlossaryCodes(iNbItem), iNbItem)
	   	Next iNbItem
	   	HideLoader
	   	oDialogLoader.Visible = False
	   	oDialog.Execute
   	End If
And it works exactly as I expected !
Ideally it would be ince to prevent any action at all while the loader is there, but for now it will be enough.
Thanks a lot for your help !!!