Dim vReturn As Variant
vReturn = Application.GetOpenFilename()
If TypeName(vReturn) = "Boolean" Then
'therefore False must have been returned
This method can return either False, a single filename or an array of filenames if multi-select=true
However the following lines of code will only work when Windows Language is English
Dim sReturn As String
sReturn = Application.GetOpenFilename()
If sReturn = "False" Then
This method automatically converts the returned value to a string using the Windows Regional Language
Use the Object Browser and check the type returned from the function or method.
For example Application.GetOpenFileName returns a Variant which can contain True or False
If you assign the returned value to a string datatype the Boolean value is converted using WRS and will therefore not always equal "False"
© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext