View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Read folder access rights

Eric,

You could just open the file and check if it is open read-only

Dim sFile As String

sFile = "C:\myTest\volker1.xls"
On Error GoTo file_error
Workbooks.Open Filename:=sFile
If ActiveWorkbook.ReadOnly = True Then
MsgBox sFile & " is in read-only", 5, "Title", vbYesNo
ActiveWorkbook.Close savechanges:=False
Exit Sub
End If

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Eric van Uden" <eric[ @ ]doornroosje[ . ]nl wrote in message
...
Hello group,

This has probably been answered before, bu I cannot locate the answer.
Before opening a workbook from another workbook, I need to check if the

user
has write permission for the file.
Then I can warn the user if opening the file to continue the procedure
would be useless, and offer a cancel.

Using Excel 2k and up on WinXP boxes, WinNT and Server 2k3 networking.

Any pointers would be appreciated.

Eric