Read Only Attribute

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
Dirk,

Thank you. It works as follows:

SetAttr (strnewroot & strfilename), vbReadOnly

Haave a great weekend.
 

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

Back
Top