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.
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.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks