LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default Limiting files to open to only files with certain name.

I have a User Form with a Control Button that is for opening Exsisting Files.
I only want to Open Files with the word "Spec" in the name? Is there a way to
only show & Open Excel Files with "Spec' in the name?

I have the following code that opens the Dialog Box, but it shows all the
files with the ".xlsm" extension. I want to narrow it down to only files with
"Spec" in the name. It would be nice if it would show all the differnt excel
file extensions.


' Open Existing Eng Spec 9 Control Button
Private Sub Open_Existing_Eng_Spec_9_Click()

FileToOpen = Application.GetOpenFilename("SPEC" (*.xlsm), *.xlsm")

If FileToOpen = False Then

MsgBox "The Open Method Failed, No Eng Spec was Opened", , "C.E.S."

Exit Sub

End If

Set bk = Workbooks.Open(Filename:=FileToOpen)
End Sub
 
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
Open Text Files/Format/Save as .xls for multiple files. Ray Excel Programming 9 June 9th 09 04:23 PM
How to change default Open/Files of Type to "Microsoft Excel Files Tammy Excel Discussion (Misc queries) 2 January 14th 08 11:06 PM
Limiting files to a single computer Berj Excel Discussion (Misc queries) 1 September 15th 06 09:12 PM
Macro to open *.dat files and save as .txt (comma delimited text files) [email protected] Excel Programming 2 November 30th 05 05:50 AM


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