Copy, Paste, Hide

  • Thread starter Thread starter alex
  • Start date Start date
A

alex

Hello all,

Using Access ’03…

I have some VBA code that copies an mdb from one directory to another;
e.g.:

FileCopy SourceFile, DestinationFile (where both are defined in
previous code)

When the file is copied to the destination, I’d like its attribute to
be hidden.

Can I do this in code?

Thanks,
alex
 
SetAttr "C:\Folder\File.mdb", GetAttr("C:\Folder\File.mdb") Or vbHidden

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Hello all,

Using Access ’03…

I have some VBA code that copies an mdb from one directory to another;
e.g.:

FileCopy SourceFile, DestinationFile (where both are defined in
previous code)

When the file is copied to the destination, I’d like its attribute to
be hidden.

Can I do this in code?

Thanks,
alex
 
SetAttr "C:\Folder\File.mdb", GetAttr("C:\Folder\File.mdb") Or vbHidden

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)


Hello all,

Using Access ’03…

I have some VBA code that copies an mdb from one directory to another;
e.g.:

FileCopy SourceFile, DestinationFile (where both are defined in
previous code)

When the file is copied to the destination, I’d like its attribute to
be hidden.

Can I do this in code?

Thanks,
alex

Works perfectly Doug. Thanks for your help.
alex
 
alex said:
Works perfectly Doug. Thanks for your help.

Of course, you realize that hidden files can be easily viewed by changing
the settings in Windows Explorer.
 
Of course, you realize that hidden files can be easily viewed by changing
the settings in Windows Explorer.

I did know that. Most/all of my users have not changed that setting.
Besides, hiding the file is a nice-to-have; they'll be using it, but
not directly.
alex
 

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

Similar Threads


Back
Top