How to unset the read only file attribute

C

Charles Tam

In Access 97 code module, how do I unset a file's read only file attribute?
 
J

John Nurick

Hi Charles,

Something like this should do it:

SetAttr strFileSpec, GetAttr(strFileSpec) And (255 - vbReadOnly)

If you're certain that it's not necessary to preserve the file's other
attributes, you can just use

SetAttr strFileSpec, vbNormal
 
Top