Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
My Visual Basic application is using Excel for reporting. I need to restrict the users of my application to open only excel files from the File-Open dialogue box. Or Is there any way to make default €˜Excel files (*.xls) in the Files type combo box in the Open dialog box and disabling the Files type combo box, so that the users can only select excel files when they click File-Open. Please help me in this regard. -- ourspt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
.... ' Asking for file name Const fTitle = "Select File!" Const FilterList = "Templates (*.XLS), *.XLS" fFullName = Application.GetOpenFilename(Title:=fTitle, FileFilter:=FilterList) If fFullName = "False" Then MsgBox ("No file to open!") ActiveWindow.Close Exit Sub End If .... Arvi Laanemets "ourspt" wrote in message ... Hi All, My Visual Basic application is using Excel for reporting. I need to restrict the users of my application to open only excel files from the File-Open dialogue box. Or Is there any way to make default 'Excel files (*.xls)' in the Files type combo box in the Open dialog box and disabling the Files type combo box, so that the users can only select excel files when they click File-Open. Please help me in this regard. -- ourspt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You can disable the file menu and let the user select a file through a function you write like this Function GetImportFileName() Dim Filt As String Dim FilterIndex As Integer Dim FilaName As Variant Dim Title As String Dim i As Integer Dim Msg As String Filt = "Text Files (*.txt),*.txt," & _ "Lotus Files (*.prn),*.prn," & _ "ASCII Files (*.asc),*.asc," & _ "All Files (*.*),*.*," FilterIndex = 4 Title = "Select a File to Import" Filename = Application.GetOpenFilename( _ FileFilter:=Filt, _ FilterIndex:=FilterIndex, _ Title:=Title, _ MultiSelect:=False _ ) If Filename = "False" Then MsgBox "No file was selected." Exit Function End If GetImportFileName = Filename End Function kaak -- Kaak ------------------------------------------------------------------------ Kaak's Profile: http://www.excelforum.com/member.php...fo&userid=7513 View this thread: http://www.excelforum.com/showthread...hreadid=477437 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You've gotten other replies to your other posts, too.
ourspt wrote: Hi All, My Visual Basic application is using Excel for reporting. I need to restrict the users of my application to open only excel files from the File-Open dialogue box. Or Is there any way to make default €˜Excel files (*.xls) in the Files type combo box in the Open dialog box and disabling the Files type combo box, so that the users can only select excel files when they click File-Open. Please help me in this regard. -- ourspt -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Microsoft Excel Viewer cannot open files of this type (xlsx) | Setting up and Configuration of Excel | |||
How to change default Open/Files of Type to "Microsoft Excel Files | Excel Discussion (Misc queries) | |||
Open Dialog Box in Excel 2007 Scrolls Past Files | Excel Discussion (Misc queries) | |||
disabling the Files type combo box | Excel Discussion (Misc queries) | |||
Open find file dialog multiple files | Excel Programming |