Initialize Dialog Selecting First Item to Listbox

good evening…

I created a dialog (“Dialogo”) with two listbox…

And i need to when i initialize this dialog, the first item to “ListBox_Itens” automaticaly can be selected…

this image below show what i need…

Example basic code for initialising the listbox when the dialog is started:-

Sub Main
	
	Dim vControl As Variant
	
	MySampleDialog = CreateUnoDialog(DialogLibraries.Standard.Dialog1)
	
	vControl = MySampleDialog.getControl("ListBox_Previa")
	vControl.selectItemPos(0, True)
	
	MySampleDialog.execute()
End Sub

Thanks mark_t…

it’s working…