LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Art Art is offline
external usenet poster
 
Posts: 587
Default GetOpenFileName - no array?

A very weird problem...

I've got a few fairly busy workbooks, lots of sheets, lots of code. I added
the following code:

sub temp
dim x as variant
x=application.getopenfilename(,,,,true)
stop
end sub

When I go into immediate mode, x has a single value, one of the files
selected. If I try to look at x(1) I get an error as x does not seem to be
an array.

I spent over an hour trying the following:
- got rid of all of the code, except for my temp sub (still failed)
- got rid of all names in the workbook (still failed)
- got rid of all but one sheet (aha!)
- etc.

Eventually I found that if I deleted one sheet in particular, the code
returned an array. Then I re-loaded, left the sheet in, but deleted all rows
and columns. It worked. I then moved, just moved, another sheet -- it
failed. I moved that other sheet around, and eventually it succeeded and
returned an array.

Can anyone give me any clues as to what's going on?
I'm running Excel 2003(11.8134.8132) SP2
 
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
VBA 6.0 GetOpenFilename [email protected] Excel Programming 4 February 28th 07 08:44 AM
GetOpenFileName with F*.txt DRK Excel Programming 6 June 7th 05 12:45 PM
GetOpenFilename Roman Excel Programming 5 February 8th 05 10:20 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


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