Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like the following:
Dim Attr As Long Attr = GetAttr("\\DellLapTop\MainDrive\Temp") If Attr And vbReadOnly Then Debug.Print "Folder is read-only" Else Debug.Print "Folder is read-write" End If You can also do it with the Scripting.FileSystemObject Dim FSO As Object Set FSO = CreateObject("Scripting.FileSystemObject") If FSO.GetFolder("\\DellLapTop\MainDrive\Temp").Attri butes And 1 Then Debug.Print "Folder is read only" Else Debug.Print "Folder is read-write" End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "Nigel RS" wrote in message ... What is the best method of testing if a directory has read and write access? I have an application that saves files to a network server, I want to test that the user on opening the application (from a local drive) has read or read/write access to the remote server directory. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to get write access from read-onlly mode | Excel Discussion (Misc queries) | |||
Testing of a workbook is in read only mode | Excel Programming | |||
How can a file be converted from Read-Only to Read/Write | Excel Discussion (Misc queries) | |||
Testing for filke in directory | Excel Programming | |||
Getting open file's directory, captureing user login ID, write access | Excel Programming |