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: 28
Default Application.GetOpenFileName() question

To All,

I'm trying to get the results of the GetOpenFileName() to filter all
files in the directory so that only those files that begin with the
letters: "ROSTER" are presented as a choice to Select from.
Currently, my code presents all .xls files in the directory and when
the dialog box pops up, I have to type in the 'FileName' box: ROSTER*
(then tab key) - only then do the filtered results of the dialogue
box match what I'm attempting to do through code ...

Any guidance would be greatly appreciated ...

Dim sDir As String
sDir = ThisWorkbook.Path ' Set path = to directory workbook is
stored in
Dim fnROSTER_MASTER As Variant
Dim strFilter As String: Dim strTitle As Variant
strFilter = "Excel (*.xls),*.xls" ' Another Example of filtered
input
strTitle = "SELECT ROSTER file"
ChDrive sDir
ChDir sDir
' Get the CPC file name
fnROSTER_MASTER = Application.GetOpenFilename(strFilter,
Title:=strTitle)
' Did USER abort/cancel the reguest?
If fnROSTER_MASTER = False Then
Exit Function
End If

 
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
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) Paul Martin Excel Programming 5 August 5th 05 04:44 PM
Application.GetOpenFilename Nigel Excel Programming 0 March 23rd 05 03:24 PM
Application.GetOpenFilename Greg[_19_] Excel Programming 3 February 20th 05 01:55 AM
Application.GetOpenFilename Philipp Oberleitner[_2_] Excel Programming 2 July 9th 04 07:29 PM
Application.GetOpenFileName ptrowe Excel Programming 2 September 11th 03 12:54 PM


All times are GMT +1. The time now is 05:06 AM.

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"