Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
areddy
 
Posts: n/a
Default 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   Report Post  
Dave Peterson
 
Posts: n/a
Default 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
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
Select rows and sort based on type Sarah Excel Discussion (Misc queries) 0 October 11th 05 05:06 PM
Nesting Combo Boxes /Returning an Array ELMONDO SNITHER Excel Discussion (Misc queries) 1 June 30th 05 01:15 AM
Help with refrencing files and combo boxes Akira5284 Excel Discussion (Misc queries) 1 June 2nd 05 08:16 PM
Cannot access read-only documents. tomgillane Excel Discussion (Misc queries) 14 February 7th 05 10:53 PM
dynamic combo boxes tjb Excel Worksheet Functions 2 January 25th 05 07:33 PM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"