#1   Report Post  
Posted to microsoft.public.excel.misc
CH CH is offline
external usenet poster
 
Posts: 49
Default Excel Extensions

Hi All,

I received a VBA which contains the sentences that goes like :
Set WH = workbook("file1").

file1 is an excel workbook and it is open.

It worked fine most of the time. However, one of my computers shows
"subscription out of range" when I tried to execute this VBA.

My colleague changed the statement to
Set WH = workbook("file1.xls") with the extension.

It now works fine on this computer but he does not understand how it works
with the extension.

How can we set Excel such that it disregards the extension?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Excel Extensions

Excel uses a windows setting
In winXP Home:
Open windows explorer
Tools|Folder Options|View tab
check "hide extensions for known file types"
(this is a user by user setting, too!)

But this will tick most users off--it would me! I always want to see the
extensions.

You'll be better off if you change the code to always include the extension.

I don't think you'll be able to control users to leave this setting the way you
want.



ch wrote:

Hi All,

I received a VBA which contains the sentences that goes like :
Set WH = workbook("file1").

file1 is an excel workbook and it is open.

It worked fine most of the time. However, one of my computers shows
"subscription out of range" when I tried to execute this VBA.

My colleague changed the statement to
Set WH = workbook("file1.xls") with the extension.

It now works fine on this computer but he does not understand how it works
with the extension.

How can we set Excel such that it disregards the extension?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default Excel Extensions

As far as i know that cannot be done. Someone else here might be able to tell
me i'm wrong, but i believe if you have another type of file with the same
name it will generate the error. Why can you not use the extension?
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"ch" wrote:

Hi All,

I received a VBA which contains the sentences that goes like :
Set WH = workbook("file1").

file1 is an excel workbook and it is open.

It worked fine most of the time. However, one of my computers shows
"subscription out of range" when I tried to execute this VBA.

My colleague changed the statement to
Set WH = workbook("file1.xls") with the extension.

It now works fine on this computer but he does not understand how it works
with the extension.

How can we set Excel such that it disregards the extension?

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
how do I show file extensions when a workbook opens in excel 2003 Luis Excel Discussion (Misc queries) 1 June 8th 06 11:39 AM
Can not open excel file xls. extensions cjshazen Excel Discussion (Misc queries) 1 February 14th 06 01:17 AM
Excel 2002 File Extensions TaleTeller Excel Discussion (Misc queries) 1 September 22nd 05 10:11 PM
When I try to set Excel to open certain file extensions I cannot . Lee Excel Discussion (Misc queries) 1 April 3rd 05 10:41 AM
would like to open .LCD (lucid 3d) extensions in excel bobk Excel Discussion (Misc queries) 0 February 1st 05 09:27 PM


All times are GMT +1. The time now is 09:10 PM.

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

About Us

"It's about Microsoft Excel"