Home |
Search |
Today's Posts |
#1
|
|||
|
|||
disabling the Files type combo box
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 -- areddy ------------------------------------------------------------------------ areddy's Profile: http://www.excelforum.com/member.php...o&userid=28204 View this thread: http://www.excelforum.com/showthread...hreadid=477439 |
#2
|
|||
|
|||
disabling the Files type combo box
I still don't think so.
Even if you force the dialog open with just *.xls types, the user can type: *.* in the filename and open whatever they want. But you could ask for the filename to open, then yell if the extension isn't ..xls. dim myFileName as variant myfilename = application.getopenfilename("Excel Files, *.xls") if myfilename = false then exit sub 'user hit cancel end if if lcase(right(myfilename,4)) < ".xls" then msgbox "Nope--only .xls files can be opened! exit sub end if areddy 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 -- areddy ------------------------------------------------------------------------ areddy's Profile: http://www.excelforum.com/member.php...o&userid=28204 View this thread: http://www.excelforum.com/showthread...hreadid=477439 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select rows and sort based on type | Excel Discussion (Misc queries) | |||
Nesting Combo Boxes /Returning an Array | Excel Discussion (Misc queries) | |||
Help with refrencing files and combo boxes | Excel Discussion (Misc queries) | |||
Cannot access read-only documents. | Excel Discussion (Misc queries) | |||
dynamic combo boxes | Excel Worksheet Functions |