LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default GetOpenFilename MultiSelect failure

I need to use Application.GetOpenFilename with MultiSelect set to True to
obtain a list of files as an array. The project is rather large and complex.
The appended code consistantly failes to return an array. It is just simple
test code.

When it is run in this project it returns "String" when it should return
"Variant". Other projects return "Variant" with the exact same code. MsgBox
UBound(arr) returns an error ("Type mismatch") but in other projects the
exact same code (copied and pasted) returns an integer.

I have commented out all Workbook_Open code plus all other code in standard
modules (UF code excepted) including all local and public var declarations;
then closed and reopend the project, in an attempt to source the problem.
This has no effect. I ensure that I select the exact same files in exactly
the same way. I have used Rob Bovey's Code Cleaner to no effect. I have
exported the code module to a floppy and imported to another project on
another computer and it works (in the context of the entire module). I have
rebooted to no effect.

Hoping someone has an insight or can provide a list of the usual suspects.
It's an important project and I need this to work. My brain is fogged from
late nights working on this. For what it's worth, the test code follows. Very
appreciative of your time and effort.

Greg

Sub Test()
Dim arr As Variant
arr = Application.GetOpenFilename("Excel files (*.xls), *.xls",
MultiSelect:=True)
MsgBox TypeName(arr)
End Sub
 
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
vlookup failure & ctrl-f failure? joemeshuggah Excel Discussion (Misc queries) 4 December 22nd 08 07:22 PM
Multiselect Listbox use RKS Excel Discussion (Misc queries) 1 May 12th 06 03:04 PM
List Box - MultiSelect Bill[_28_] Excel Programming 2 January 31st 05 10:31 PM
VBA prob-GetOpenFilename with multiselect=true returns string felze84 Excel Programming 1 October 18th 04 09:33 PM
Multiselect Boxes Jase Excel Programming 2 October 22nd 03 03:40 AM


All times are GMT +1. The time now is 02:44 PM.

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"