View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Workbook and Window object question

All PC's support extensions. the option you talk about just doesn't display
the extension. It doesn't change the way Excel saves the file.

If you are querying the user for the filename (and you thing they may not
enter the extension), then you can check for the existence of the file with
the Dir command. the dir command does support wildcards. Once you
ascertain the existence of the file and its exact name, you can proceed.
Use the exact name of the file (including extension if it has one) and you
should do fine.

--
Regards,
Tom Ogilvy

"Frederick Chow" wrote in message
...
I know, but I can't be sure if my macro will work properly if someone

else's
PC doesn't use extensions. So any further advise?

Frederick Chow

"Doug Glancy" wrote in message
...
Frederick,

If you use the file extension, e.g., Workbooks(''tester.xls") it will

work
for either Windows setting.

hth,

Doug


"Frederick Chow" wrote in message
...
Hi all,

I have a question about specifying a member of the workbooks and

windows
collection.

Suppose I have opened a file called "ABCDE.XLS", I found that whether I
should specify it as Workbooks("abcde.xls") or just Workbooks("abcde")
depends on a windows folder setting "Hide extensions for known file
types". That makes a problem for me as my macros will be run on someone
else's computers.

Are there any possible means to make things easier, for example is it
possible to use wildcards to specify a member of a workbooks or windows
collection? Please advise.

Frederick Chow
Hong Kong.