Hi Folks,
If you specify MultiSelect as True in the GetOpenFileName method, the return value is an array. However, if the user presses Cancel, the return value is False. I need a good strategy for dealing with both scenarios. The code shown below gives a type mismatch if the user Cancels.
<pre>Dim RefFiles()
RefFiles() = Application.GetOpenFilename(FileFilt, 2, Title, , True)
</pre>
The sample code in Help shows how to check for Cancel with MultiSelect set to False, but the code for checking the result has to come _after_ the GetOpenFileName method successfully returns a result to the variable. Since I can't get past the type mismatch, I can't check the result. e.g.
<pre> RefFiles() = Application.GetOpenFilename(FileFilt, 2, Title, , True)
If IsArray(RefFiles()) Then
' User picked some files
Else
' User Cancelled
End If
</pre>
doesn't "cut it".
Thanks in advance!



