File type default for {File - Open}

I open a large number of files in Excel from within the 
application to force the Text Import Wizard to run.  
The "Files of Type" is always the default "All Microsoft 
Excel Files".  It would be wonderful if I could make the 
default "All Files (*.*).  I have searched for a solution 
but found nothing.

Is there a way?  Can anyone help?

  
0
anonymous (74717)
12/19/2003 4:05:56 PM
excel.misc 78881 articles. 5 followers. Follow

4 Replies
362 Views

Similar Articles

[PageSpeed] 2

GetOpenFilename Method  

See Also Applies To Example Specifics 
Displays the standard Open dialog box and gets a file name 
from the user without actually opening any files.

expression.GetOpenFilename(FileFilter, FilterIndex, Title, 
ButtonText, MultiSelect)

expression   Required. An expression that returns an 
Application object.

FileFilter   Optional Variant. A string specifying file 
filtering criteria. 

This string consists of pairs of file filter strings 
followed by the MS-DOS wildcard file filter specification, 
with each part and each pair separated by commas. Each 
separate pair is listed in the Files of type drop-down 
list box. For example, the following string specifies two 
file filters-text and addin: "Text Files (*.txt),*.txt,Add-
In Files (*.xla),*.xla".

To use multiple MS-DOS wildcard expressions for a single 
file filter type, separate the wildcard expressions with 
semicolons; for example, "Visual Basic Files (*.bas; 
*.txt),*.bas;*.txt".

If omitted, this argument defaults to "All Files 
(*.*),*.*".

FilterIndex   Optional Variant. Specifies the index 
numbers of the default file filtering criteria, from 1 to 
the number of filters specified in FileFilter. If this 
argument is omitted or greater than the number of filters 
present, the first file filter is used.

Title   Optional Variant. Specifies the title of the 
dialog box. If this argument is omitted, the title 
is "Open."

ButtonText   Optional Variant. Macintosh only.

MultiSelect   Optional Variant. True to allow multiple 
file names to be selected. False to allow only one file 
name to be selected. The default value is False

Remarks
This method returns the selected file name or the name 
entered by the user. The returned name may include a path 
specification. If MultiSelect is True, the return value is 
an array of the selected file names (even if only one 
filename is selected). Returns False if the user cancels 
the dialog box.

This method may change the current drive or folder.

Example
This example displays the Open dialog box, with the file 
filter set to text files. If the user chooses a file name, 
the code displays that file name in a message box.

fileToOpen = Application _
    .GetOpenFilename("Text Files (*.txt), *.txt")
If fileToOpen <> False Then
    MsgBox "Open " & fileToOpen
End If

>-----Original Message-----
>I open a large number of files in Excel from within the 
>application to force the Text Import Wizard to run.  
>The "Files of Type" is always the default "All Microsoft 
>Excel Files".  It would be wonderful if I could make the 
>default "All Files (*.*).  I have searched for a solution 
>but found nothing.
>
>Is there a way?  Can anyone help?
>
>  
>.
>
0
anonymous (74717)
12/19/2003 8:33:13 PM
Thanks for your input.  However, I lack the knowledge to 
know what to do with it.  Is the code example something 
that I can modify and use in some way?  I need a lower 
level explaination.  

 
>-----Original Message-----
>GetOpenFilename Method  
>
>See Also Applies To Example Specifics 
>Displays the standard Open dialog box and gets a file 
name 
>from the user without actually opening any files.
>
>expression.GetOpenFilename(FileFilter, FilterIndex, 
Title, 
>ButtonText, MultiSelect)
>
>expression   Required. An expression that returns an 
>Application object.
>
>FileFilter   Optional Variant. A string specifying file 
>filtering criteria. 
>
>This string consists of pairs of file filter strings 
>followed by the MS-DOS wildcard file filter 
specification, 
>with each part and each pair separated by commas. Each 
>separate pair is listed in the Files of type drop-down 
>list box. For example, the following string specifies two 
>file filters-text and addin: "Text Files 
(*.txt),*.txt,Add-
>In Files (*.xla),*.xla".
>
>To use multiple MS-DOS wildcard expressions for a single 
>file filter type, separate the wildcard expressions with 
>semicolons; for example, "Visual Basic Files (*.bas; 
>*.txt),*.bas;*.txt".
>
>If omitted, this argument defaults to "All Files 
>(*.*),*.*".
>
>FilterIndex   Optional Variant. Specifies the index 
>numbers of the default file filtering criteria, from 1 to 
>the number of filters specified in FileFilter. If this 
>argument is omitted or greater than the number of filters 
>present, the first file filter is used.
>
>Title   Optional Variant. Specifies the title of the 
>dialog box. If this argument is omitted, the title 
>is "Open."
>
>ButtonText   Optional Variant. Macintosh only.
>
>MultiSelect   Optional Variant. True to allow multiple 
>file names to be selected. False to allow only one file 
>name to be selected. The default value is False
>
>Remarks
>This method returns the selected file name or the name 
>entered by the user. The returned name may include a path 
>specification. If MultiSelect is True, the return value 
is 
>an array of the selected file names (even if only one 
>filename is selected). Returns False if the user cancels 
>the dialog box.
>
>This method may change the current drive or folder.
>
>Example
>This example displays the Open dialog box, with the file 
>filter set to text files. If the user chooses a file 
name, 
>the code displays that file name in a message box.
>
>fileToOpen = Application _
>    .GetOpenFilename("Text Files (*.txt), *.txt")
>If fileToOpen <> False Then
>    MsgBox "Open " & fileToOpen
>End If
>
>>-----Original Message-----
>>I open a large number of files in Excel from within the 
>>application to force the Text Import Wizard to run.  
>>The "Files of Type" is always the default "All Microsoft 
>>Excel Files".  It would be wonderful if I could make the 
>>default "All Files (*.*).  I have searched for a 
solution 
>>but found nothing.
>>
>>Is there a way?  Can anyone help?
>>
>>  
>>.
>>
>.
>
0
anonymous (74717)
12/19/2003 10:22:56 PM
This was copied from Excel VBA Help.  But I think I 
misread your initial question.  I thought you had some 
VBA code already in place to open these files.

I dont know of an easy way to accomplish that.  But you 
would think there should be easy way outside of creating 
some code.  Maybe try Excel Programming newsgroup, they 
may have a suggestion.

>-----Original Message-----
>Thanks for your input.  However, I lack the knowledge to 
>know what to do with it.  Is the code example something 
>that I can modify and use in some way?  I need a lower 
>level explaination.  
>
> 
>>-----Original Message-----
>>GetOpenFilename Method  
>>
>>See Also Applies To Example Specifics 
>>Displays the standard Open dialog box and gets a file 
>name 
>>from the user without actually opening any files.
>>
>>expression.GetOpenFilename(FileFilter, FilterIndex, 
>Title, 
>>ButtonText, MultiSelect)
>>
>>expression   Required. An expression that returns an 
>>Application object.
>>
>>FileFilter   Optional Variant. A string specifying file 
>>filtering criteria. 
>>
>>This string consists of pairs of file filter strings 
>>followed by the MS-DOS wildcard file filter 
>specification, 
>>with each part and each pair separated by commas. Each 
>>separate pair is listed in the Files of type drop-down 
>>list box. For example, the following string specifies 
two 
>>file filters-text and addin: "Text Files 
>(*.txt),*.txt,Add-
>>In Files (*.xla),*.xla".
>>
>>To use multiple MS-DOS wildcard expressions for a 
single 
>>file filter type, separate the wildcard expressions 
with 
>>semicolons; for example, "Visual Basic Files (*.bas; 
>>*.txt),*.bas;*.txt".
>>
>>If omitted, this argument defaults to "All Files 
>>(*.*),*.*".
>>
>>FilterIndex   Optional Variant. Specifies the index 
>>numbers of the default file filtering criteria, from 1 
to 
>>the number of filters specified in FileFilter. If this 
>>argument is omitted or greater than the number of 
filters 
>>present, the first file filter is used.
>>
>>Title   Optional Variant. Specifies the title of the 
>>dialog box. If this argument is omitted, the title 
>>is "Open."
>>
>>ButtonText   Optional Variant. Macintosh only.
>>
>>MultiSelect   Optional Variant. True to allow multiple 
>>file names to be selected. False to allow only one file 
>>name to be selected. The default value is False
>>
>>Remarks
>>This method returns the selected file name or the name 
>>entered by the user. The returned name may include a 
path 
>>specification. If MultiSelect is True, the return value 
>is 
>>an array of the selected file names (even if only one 
>>filename is selected). Returns False if the user 
cancels 
>>the dialog box.
>>
>>This method may change the current drive or folder.
>>
>>Example
>>This example displays the Open dialog box, with the 
file 
>>filter set to text files. If the user chooses a file 
>name, 
>>the code displays that file name in a message box.
>>
>>fileToOpen = Application _
>>    .GetOpenFilename("Text Files (*.txt), *.txt")
>>If fileToOpen <> False Then
>>    MsgBox "Open " & fileToOpen
>>End If
>>
>>>-----Original Message-----
>>>I open a large number of files in Excel from within 
the 
>>>application to force the Text Import Wizard to run.  
>>>The "Files of Type" is always the default "All 
Microsoft 
>>>Excel Files".  It would be wonderful if I could make 
the 
>>>default "All Files (*.*).  I have searched for a 
>solution 
>>>but found nothing.
>>>
>>>Is there a way?  Can anyone help?
>>>
>>>  
>>>.
>>>
>>.
>>
>.
>
0
anonymous (74717)
12/21/2003 4:23:17 PM
Check out knowledge base article number 213755.  This is 
exactly what you are looking for:

http://support.microsoft.com/default.aspx?scid=kb;en-
us;213755&Product=xlw

>-----Original Message-----
>Thanks for your input.  However, I lack the knowledge to 
>know what to do with it.  Is the code example something 
>that I can modify and use in some way?  I need a lower 
>level explaination.  
>
> 
>>-----Original Message-----
>>GetOpenFilename Method  
>>
>>See Also Applies To Example Specifics 
>>Displays the standard Open dialog box and gets a file 
>name 
>>from the user without actually opening any files.
>>
>>expression.GetOpenFilename(FileFilter, FilterIndex, 
>Title, 
>>ButtonText, MultiSelect)
>>
>>expression   Required. An expression that returns an 
>>Application object.
>>
>>FileFilter   Optional Variant. A string specifying file 
>>filtering criteria. 
>>
>>This string consists of pairs of file filter strings 
>>followed by the MS-DOS wildcard file filter 
>specification, 
>>with each part and each pair separated by commas. Each 
>>separate pair is listed in the Files of type drop-down 
>>list box. For example, the following string specifies 
two 
>>file filters-text and addin: "Text Files 
>(*.txt),*.txt,Add-
>>In Files (*.xla),*.xla".
>>
>>To use multiple MS-DOS wildcard expressions for a 
single 
>>file filter type, separate the wildcard expressions 
with 
>>semicolons; for example, "Visual Basic Files (*.bas; 
>>*.txt),*.bas;*.txt".
>>
>>If omitted, this argument defaults to "All Files 
>>(*.*),*.*".
>>
>>FilterIndex   Optional Variant. Specifies the index 
>>numbers of the default file filtering criteria, from 1 
to 
>>the number of filters specified in FileFilter. If this 
>>argument is omitted or greater than the number of 
filters 
>>present, the first file filter is used.
>>
>>Title   Optional Variant. Specifies the title of the 
>>dialog box. If this argument is omitted, the title 
>>is "Open."
>>
>>ButtonText   Optional Variant. Macintosh only.
>>
>>MultiSelect   Optional Variant. True to allow multiple 
>>file names to be selected. False to allow only one file 
>>name to be selected. The default value is False
>>
>>Remarks
>>This method returns the selected file name or the name 
>>entered by the user. The returned name may include a 
path 
>>specification. If MultiSelect is True, the return value 
>is 
>>an array of the selected file names (even if only one 
>>filename is selected). Returns False if the user 
cancels 
>>the dialog box.
>>
>>This method may change the current drive or folder.
>>
>>Example
>>This example displays the Open dialog box, with the 
file 
>>filter set to text files. If the user chooses a file 
>name, 
>>the code displays that file name in a message box.
>>
>>fileToOpen = Application _
>>    .GetOpenFilename("Text Files (*.txt), *.txt")
>>If fileToOpen <> False Then
>>    MsgBox "Open " & fileToOpen
>>End If
>>
>>>-----Original Message-----
>>>I open a large number of files in Excel from within 
the 
>>>application to force the Text Import Wizard to run.  
>>>The "Files of Type" is always the default "All 
Microsoft 
>>>Excel Files".  It would be wonderful if I could make 
the 
>>>default "All Files (*.*).  I have searched for a 
>solution 
>>>but found nothing.
>>>
>>>Is there a way?  Can anyone help?
>>>
>>>  
>>>.
>>>
>>.
>>
>.
>
0
anonymous (74717)
12/21/2003 4:41:53 PM
Reply:

Similar Artilces:

saving publisher file to PDF file format #2
after creating a page in publisher i need to save it as a pdf file and send by email to a publishing house "Eddie" <Eddie@discussions.microsoft.com> wrote in message news:87A433B3-6EA5-439E-806D-74C985EA24DC@microsoft.com... > after creating a page in publisher i need to save it as a pdf file and > send > by email to a publishing house If you don't have Adobe Acrobat (not the Reader), download either of these: http://www.win2pdf.com or http://www.primopdf.com ...

How do I automatically prompt to file a sent message?
As a former NOTES user, I've become accustomed to being able to both send and file an email in "one" step. In Outlook the default is to file the sent item in the "sent" folder, or the folder in which the original message resides. I'd like the option of choosing any folder in which to file the sent message to come up automatically when I send an email. Any ideas? See http://www.outlookcode.com/d/code/setsavefolder.htm for sample VBA code to do this. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators,...

Migrating Office X files to Windows SBS 2k3
I have a situation with migrating some older Office X files to a new Windows Small-Biz Server 2003 environment. It seems that the person I am working with did not use the "Append file extensions" option when saving his Office X files on his Mac server (10.2.8). So now I have a situation where I need to move these extension-less files over to the Windows server but they will lose thier file associations. Is there anyway to save this extension "metadata" to convert these files on the Windows side? I have about 20GB of data to migrate and manually opening each file wi...

Inserting a file from FTP
Hello i have a FTP server that host's files for my office to share. >From one computer that has publisher 2000 on it has problems inserting a file from the ftp into a publisher document. The error i recive from that computer is that it has a problem linking a file that is not on the computer or on the network. The odd thing is that every other computer in the building can connect to the FTP and insert images from it. Also the computer can connect to the FTP through Internet Exlplorer so connectivity isn't a problem. Any help on this would be great. Also most the other computer'...

Cursor appearance while typing in Outlook 2007
While typing in outlook 2007, the cursor will disappear most of the time and blinks on every few letters. (I'm not talking about automatically hiding the mouse cursor/pointer while tying, which is available in the Mouse visibility options). I mean the text cursor. This behavior also appears using the print view in Word 2007 (in the draft view the cursor is visible while typing). Most other applications including MS apps (and office 2003) do not behave this way. The most obvious way to show the behavior is to hold the space bar while typing an email in outlook 2007. ...

Excel File Association not working
Hi, One of our users cannot open an Excel file by just double-clicking on it any longer. If he opens Excel first, he can browse to the file and open it. I looked at the file associations for .xls types of files and it lists Excel as the program to use to open .xls. I tried an Office repair, but that didn't help. Can anyone tell me how to fix this? Thanks, Sandy M Sometimes one of these works for similar problems. Tools|Options|General|Ignore other applications (uncheck it) --- or --- Close Excel and Windows Start Button|Run excel /unregserver then W...

How to save a PC Excel file into MAC (it says file is read only)?
I am having troubles with an Excel workbook I created on my PC (using Excel 2000). Essentially I can't save it in a Machintosh computer. Thanks for your help ...

How to convert binary file to ASCII file
How to convert binary file to ASCII file? Thanks in advance! "prinz" <de6666@lycos.com> wrote in message news:40222AF5.B3B6EFFB@lycos.com... > How to convert binary file to ASCII file? > > Thanks in advance! > well, an ascii file is a binary file... just the bits happen to be easily displayable as letters, number, and other symbols. you will have to find out what the meaning of each bit in the binary file is, how the bits are grouped into bytes, and how the bytes are grouped into higher order things. then read the file with the appropriate file access method a...

Default reply to font color Outlook XP
My default reply to font color is red and I can't find where to change it back to black. I can change the color on every reply but I need to know how to make the default black again. Thanks If you mean that the font color used when you type replies is red, that color is determined by selecting "Tools", "Options" from the menus, clicking on the "Mail Format" tab, clicking the "Fonts" button (near the middle of the dialogue box), and clicking the SECOND "Choose font" button (the one next to the "When replying and forwarding"...

Those damn pst files!!
Hello, I have had MANY problems with outlook, first, I had problems where I had to reinstall every time I closed outlook xp or I couldn't send emails, then I tried the detect and repair--restore defaults, then I reconfigured and it seemed to work fine...EXCEPT I could no longer intellisync or sync anything...I looked into the matter, and found that my default Outlook.pst was now outlook1.pst, so I changed the name to outlook.pst, reconfigured (again lost the address book in the process) and still can't sync...what is up with these damn pst files? WHERE should I put that OUTL...

problems with inserting html to xslt file.
Hi, I have a string/xml value that has to be inserted to a specific <xsl:tempalte> tag, I have a namespace registered so that I can insert new XSL elements. nsmgr = New XmlNamespaceManager(myXslt.NameTable) nsmgr.AddNamespace("xsl", "http://www.w3.org/1999/XSL/Transform") This is the string that has to be inserted to xsl:template tag : <tr> <td><xsl:apply-templates select="bla" /></td> </tr> If I try the element.insertXml method there is an error saying undeclared namespace and poiting to the <xsl:apply> tag. The...

Default value last value entered?
I have a continuous form (frmMain) with a table field value ([tblMain]![volume]) that is selected from a combo box (cboVolume). The form is used for entering information directly to the table. Is there any way to code it so the default value for the combo box (cboVolume) is the last value that was entered into the table? For example, I select the value "Sec 41" from the combo box and then go to the next record. I would like that to remain the default value in the combo box for the next five or six records until I change the value to "Sec 44", after which that bec...

Storing strings in header file via resource file (.rc file) ?
Hi: My application needs to support multiple languages. I'm now planning to strong strings in multiple string tables in the rc file; where each string table contains one language. My question is: will it be much simpler to store those strings in multiple header files? In this case a string can be used directly without the need to use CString to load each string before using it. Please let me know if I'm missing some advantages using the rc file to store strings. Thanks in Advance. Polaris "Polaris" <etpolaris@hotmail.com> wrote in message news:<e...

OL 2002 - Attached MSG file - No body property returned
We have a large number of psts with emails bearing problematic MSG attachments. The PST files appear to be from an Exchange environment (Likely 2000). We are using VB6 to access the data via Outlook 2002 (we've tried 2003, but with the same results). Outlook 2002 (sp-2) is not returning any value for the body property of an attached MSG email items. When opening them in Outlook, you can see that there is in fact body text which seems only to be visible when viewed through the UI in OL. Here is something odd: 1. When viewed in Quick View Plus (ver 6 & 8) it appears with only the heade...

Problem converting Quicken backup file to Money 2004
Hi, When I use the Converting Quickent Files feature, after the conversion is done, it shows the correct balance in the Quicken balance, but on the Money balance column, it's all zero. After conversion, I open the converted Money file, all accounts still show zero balance. What's the correct way to import all Quicken accounts and balance to Money? thp ...

Can i import one excel file to another excel file?
I have a new excel file that I want to update with an older excel file, can I import the two? There must be an easy way to merge the two together without having to retype. Depends on what you mean by update. If it's just to add more data to the bottom of an existing list, open both files, then select the data, Edit/Copy it and Edit/Paste to the other workbook. If that's not what you want, can you be more specific? On Thu, 14 Oct 2004 20:59:09 -0700, "kimbers867" <kimbers867@discussions.microsoft.com> wrote: >I have a new excel file that I want to update with ...

Converting a file Money 2001 --> Money 2005 Help!!
Hi, I've downloaded the trial for Money 2005 Deluxe. I was previously using Money 2001 (standard). I get an error --------------------------- Microsoft Money --------------------------- Money cannot open this file because it was created by an incompatible version. --------------------------- OK --------------------------- I've tried renaming the file and opening as someone suggested on the group somewhere which I couldn't get to work. So I downloaded the 2004 trial and converted it to 2004 which worked ok. I then tried to upgrade my new 2004 file to 2005 which failed again....

Ghost typing
Windows XP running on an older Dell PC. Oddly, about the time Windows 7 was released (and corresponding with some Automatic Windows XP Updates) my computer started a frustrating behavior. When trying to type characters in the USER password screen, IE address bar, notepad, Word or any other character input field...I am able to type one or two letters then the machine self types WWWWWWWWWWWW endlessly. The W is disabled on the keyboard. The keyboard is a Microsoft Wireless Natural Multimedia Keyboard & Mouse. I also have a WACOM Intuous 3 graphics tablet that has worked fl...

File in Use
I am using Excel 2002 XP - SP2 When I go to open up the workbook 'money' I get the following message pop up: File in Use money.xls is locked for editing by Bill Chatfield there are 3 buttons on the right of the message box read only notify cancel I have no idea why it started doing this a few days ago. I have been using this workbook for years. I check the properties and it is not 'read only' or 'hidden' and once I re-boot it will open fine and then for no apparent reason I get the above message again. The only thing I can think of that MIGHT be related to this ...

Excel file saves as a temp file with numeric file name
I have a bug with an excel worksheet. When i save the file it saves it not as my filename, but as a temp file with a name like D7d98300 and the file icon is of the MS DOS variety. When i click on the file it opens up in excel. However when i save it again it saves as a temp file with a different numerical file name. Could someone please explain what the bug is? Thanks in anticipation. Michael --- Message posted from http://www.ExcelForum.com/ When you save a file, excel will save it as a temporary file (8 characters, no extension). Then if that save is successful, excel will delete the...

hidden tif files
I activated MDI for windows 7 and can now open mdi files; however, I can't see their icons, and I can't see .tif icons. I can only tell the files are there when I print a new .tif file and the existing file list appears during the 'save as' step. How do I see the icons/files? I have already done the "show hidden files" step. Control Panel, Folder Options, View tab, Uncheck "Hide extensions for known file types." -- Mary Sauer MVP http://msauer.mvps.org/ "GretaJo" <GretaJo@discussions.microsoft.com> wrote in message n...

Keeping Folders view expanded by default (?)
Does anybody know of a way to keep certain folders (i.e. Mail folders) expanded by default when a user closes out then starts Outlook? Even if a user expands the folders during a session, they are usually collapsed by default. Is there a preferences setting I'm obviously missing, or does this require some kind of VB in the background? Many thanks! Dino Baskovic Detroit MI USA ...

Problems importing pst file...
One of the users in our office tried to open Outlook & recieved an error message that indicated that the pst was gone or corrupt. After running the Inbox repair tool to no avail, as well as picking up a copy of their pst from yesterday's backup, I'm still unable to do anything with it! When trying to import it, I get the message "Properties for this information service must be defined prior to use" & after hitting ok, I get a message that the file isn't a personal folders file! I have read several long-winded posts in other forums, which basically have given me no...

CRM data migration problem (from excel or text files to cdf_mscrm database)
Bonjour all, I'm sure you must have experience in importing the data to MS CRM cdf_mscrm database using the DTS utility in SQL server... Would you mind share with me and guide me how to do it? I read a book and it sounds easy. Moreover, I can successfully import data from a text or excel files into the SQL server sample database. However, I encounterd a problem when using the DTS service in MS SQL to migration data into the MS CRM data migration framework database (cdf_mscrm database). All data are in either excel files or text files. Error messages received when importing the dat...

Excel 2007 PC damages Mac Excel 2008 Files
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel When I open a Mac Excel 2008 file on Excel 2007 and I can work with the file, however when the file is returned to the Mac, it no longer works correctly, leading to a crash as soon as I try to save or eventually it might change the file to look like a bunch of letters and characters. Here is the error report: <br><br>Microsoft Error Reporting log version: 2.0 <br><br>Error Signature: <br> Exception: EXC_BAD_ACCESS <br> Date/Time: 2010-01-15 17:05:56 -0600 <br> Application N...