LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default File Browse Function?

I am using Excel 2003 (11.8211.8202) SP3 which is the American English
version.

Give the code I posted works flawlessly for me, I am not sure what else I
can tell you. Hopefully someone who knows something about possible
differences between international versions will come along and offer their
input.

Rick


"Stefi" wrote in message
...
I did exactly what you wrote, the result (or rather the failure) is the
same.
Can it be affected by some environmental factor (version, any settings,
etc.)? I use Excel2003 SP3 Hungarian version.

Thank you for your efforts!
Regards,
Stefi


€˛Rick Rothstein (MVP - VB)€¯ ezt Ć*rta:

I really don't understand how that could be. I tested the code before
posting it, and I re-tested it just now, and it worked perfectly for me.
All
I did was go to any code window (not the Immediate window though), type
Sub
Test() and End Sub to give it someplace to work from and copy/paste'd the
code between them. When I run the Sub Test(), the file selector window
appeared... I used the Control Key to click-select a few files (although
you
could only select one file if desired) and then clicked the Open
button....
a MsgBox appeared for each file selected showing me its path and name.
The
code works flawlessly for me... every time... so I am not sure what to
tell
you. Is anyone else out there having trouble making the code I posted
work?

Rick


"Stefi" wrote in message
...
Hi Rick,

I tried your code but it gave a "Type mismatch" error at line

For X = LBound(FilesToOpen) To UBound(FilesToOpen)

Locals window displayed the type of FilesToOpen to be Variant/String,
not
an
array as it was expected.

Regards,
Stefi

€˛Rick Rothstein (MVP - VB)€¯ ezt Ć*rta:

Give this code a try...

Dim X As Long
Dim FilesToOpen As Variant
FilesToOpen = Application.GetOpenFilename(MultiSelect:=True)
For X = LBound(FilesToOpen) To UBound(FilesToOpen)
MsgBox "Selected File #" & X & ": " & FilesToOpen(X)
Next

Don't pick too many files as you should get a MsgBox for each one you
select.

Rick


"fallowfz" wrote in message
...
That's what I ran into as well. Thanks for giving it a shot.






 
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
Browse up to file kaiser Excel Programming 1 October 3rd 05 07:51 AM
can't browse file k_anucha Excel Discussion (Misc queries) 1 September 29th 05 01:51 AM
File Browse Function (Open dialog box for choosing file) b-123 Excel Programming 1 August 25th 05 10:06 PM
File Browse Box JONNIE Excel Programming 2 February 5th 04 05:22 PM
Browse function Bijl167[_10_] Excel Programming 2 January 3rd 04 10:09 AM


All times are GMT +1. The time now is 06:02 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"