A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Copy, Paste, Hide



 
 
Thread Tools Display Modes
  #1  
Old July 9th, 2009, 11:55 AM posted to microsoft.public.access
alex
external usenet poster
 
Posts: 581
Default Copy, Paste, Hide

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
  #2  
Old July 9th, 2009, 12:12 PM posted to microsoft.public.access
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Copy, Paste, Hide

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

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


"alex" wrote in message
...
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


  #3  
Old July 9th, 2009, 02:26 PM posted to microsoft.public.access
alex
external usenet poster
 
Posts: 581
Default Copy, Paste, Hide

On Jul 9, 7:12*am, "Douglas J. Steele"
wrote:
SetAttr "C:\Folder\File.mdb", GetAttr("C:\Folder\File.mdb") Or vbHidden

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

"alex" wrote in message

...
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
  #4  
Old July 9th, 2009, 03:49 PM posted to microsoft.public.access
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Copy, Paste, Hide

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


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.

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



  #5  
Old July 9th, 2009, 04:21 PM posted to microsoft.public.access
alex
external usenet poster
 
Posts: 581
Default Copy, Paste, Hide

On Jul 9, 10:49*am, "Douglas J. Steele"
wrote:
"alex" wrote in message

...

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


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.

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


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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.