Returns the file extension of the selected file ('txt' out of 'c:\myFolder\foo.txt'). An empty String means that the user did not select any files.
dim oFileBrowser set oFileBrowser = XSIUIToolkit.FileBrowser oFileBrowser.DialogTitle = "Select a file" ' set the title of the file browser oFileBrowser.Filter = "All Files (*.*)|*.*||" ' Allow selection of all files oFileBrowser.ShowOpen ' show an open file dialog logmessage VB_LF ' if the user selected a file If oFileBrowser.FilePathName <> "" Then logmessage "File extension : " & oFileBrowser.FileExtension ' the user did not select a file Else logmessage "User pressed cancel" End If |