Read Only Attribute

D

Deadeye

I am trying to move a file from one drive to another and need to make the
moved file a read only version. How do I do this?
This is where I am at the moment:
Name ("T:\Users\" & CurrentUser() & "\" & Me.lstImportFiles) As (strnewroot
& strfilename)

Thank you very much in advance.
 
D

Dirk Goldgar

Deadeye said:
I am trying to move a file from one drive to another and need to make
the moved file a read only version. How do I do this?
This is where I am at the moment:
Name ("T:\Users\" & CurrentUser() & "\" & Me.lstImportFiles) As
(strnewroot & strfilename)

Check out the SetAttr statement in the VB online help. I believe you'd
need a statement like this:

SetAttr strnewroot & strfilename, vbReadOnly
 
D

Deadeye

Dirk,

Thank you. It works as follows:

SetAttr (strnewroot & strfilename), vbReadOnly

Haave a great weekend.
 
Top