How to unset the 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
 
G

Guest

John,

Thank you for providing a great solution to my problem! Although I know that
it works, would you be able to point me in the direction of a resource
discussing the "255 -"? I was not able to find an explanation in Microsoft
Visual Basic Help for turning off a specific attribute.

Thank you,
Oli Bautista
04.26.07 21.20 hst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top