OpenDialog.Count

From Xojo Documentation

Property (As Integer )
aOpenDialog.Count = newIntegerValue
or
IntegerValue = aOpenDialog.Count

New in 2010r4

Supported for all project types and targets.

The number of items selected by the user in the OpenDialog. If MultiSelect is True, the number can be greater than 1.

Example

The following gets the number of items the user selected. In this case, it will be 1 since MultiSelect is not selected.

Dim f As FolderItem = dlg.ShowModal
Dim i As Integer = dlg.Count