Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default GetOpenFilename With MultiSelect Intermittently Returns String

Sure enough, I came back to work on Monday and I am getting the error
again.
So you are probably right.


I also think Greg is right, an Isformula CF that includes a worksheet
function the culprit, same with app.Inputbox type 8.

The FileDialog property appears to work in
exactly the same manner as GetOpenFilename,


Good idea but bear in mind it needs XL2002 or later.

Regards,
Peter T


"Lazzaroni" wrote in message
...
Greg:

Sure enough, I came back to work on Monday and I am getting the error

again.
So you are probably right.

Fortunately, I think I may have found an even better alternative.

In all my searching about the GetOpenFilename method nobody ever suggested
using the FileDialog property. The FileDialog property appears to work in
exactly the same manner as GetOpenFilename, but has even more flexibility.

Dim oFileDialog As FileDialog
Dim oSelectedItem As Variant
Set oFileDialog = Application.FileDialog(msoFileDialogFilePicker)
oFileDialog.AllowMultiSelect = True
If oFileDialog.Show = -1 Then
For Each oSelectedItem In oFileDialog.SelectedItems
MsgBox "Selected item's path: " & oSelectedItem
Next
End If
End With
Set oFileDialog = Nothing

I can only hope that the FileDialog property does not experience the same
problem as GetOpenFilename.

Thanks for your help.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetOpenFilename MultiSelect failure Greg Wilson Excel Programming 12 January 2nd 06 12:16 AM
VBA prob-GetOpenFilename with multiselect=true returns string felze84 Excel Programming 1 October 18th 04 09:33 PM
GetOpenFilename returns a string rather than an array Dan Frederick Excel Programming 0 April 20th 04 08:38 PM
GetOpenFilename returns a string rather than an array Claritech Excel Programming 0 April 20th 04 06:08 PM
Calling a C++ DLL which returns a String Vorreiter Johann \(IFDA\) Excel Programming 2 January 13th 04 06:59 AM


All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"