Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

File open - .xls not recognized as spreadsheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vrzimmerm@hotmail.com - 18 Sep 2007 15:13 GMT
I'm trying to write a macro where the first step is to turn control
over to the user to specify a spreadsheet file that is to be opened.
I am using the  "Application.GetOpenFilename" command to do this.

It seems that even tho the file to be opened is a .xls file  Excel
doesn't recognize it as a spreadsheet  -  it seems to treat this as a
text file. (Note:  when I try to open this same .xls file Excel
responds by opening the Text Import Wizard window.  Proceeding using
the default options then works fine.)     How can I have the macro
proceed with  the opening of the specified file by recognizing tabs as
the delimiter between the columns?
Joel - 18 Sep 2007 16:40 GMT
try this

Workbooks.Open Filename:=Filename, Format:=2

Format   Optional Variant. If Microsoft Excel is opening a text file, this
argument specifies the delimiter character, as shown in the following table.
If this argument is omitted, the current delimiter is used.

Value Delimiter
1 Tabs
2 Commas
3 Spaces
4 Semicolons
5 Nothing
6 Custom character (see the Delimiter argument)

> I'm trying to write a macro where the first step is to turn control
> over to the user to specify a spreadsheet file that is to be opened.
[quoted text clipped - 7 lines]
> proceed with  the opening of the specified file by recognizing tabs as
> the delimiter between the columns?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.