Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Default to Read Only
Hi,
Please shed me light on the macro syntax to default the OpenFile option to 'Read Only' when a dialog box is prompted for password-protected file. Thanks, Kenny. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Default to Read Only
Kenny
avoid the FileFind Dialog: you'll have no control use GetOpenFileName to get the user to tell you which file he wants. then have your code do it with all the verifications etc that you want.. in this case few.. just the Readonly Sub OpenRO() Dim vFile As Variant vFile = Application.GetOpenFilename("Excel Files,*.xls") If vFile = False Then Beep Else Workbooks.Open vFile, ReadOnly:=True End If End Sub see VBA help for the methods.. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam KNg wrote : Hi, Please shed me light on the macro syntax to default the OpenFile option to 'Read Only' when a dialog box is prompted for password-protected file. Thanks, Kenny. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Default Windows Profile without default Office user info | Excel Discussion (Misc queries) | |||
I have a read only xl file, I need it to be read and write | Excel Discussion (Misc queries) | |||
How can a file be converted from Read-Only to Read/Write | Excel Discussion (Misc queries) | |||
How to set Read-Only Recommended as default save in Excel 2002? | Excel Discussion (Misc queries) | |||
read-only default | Excel Programming |