LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default protecting a csv file

"lothario" wrote in message
...

Hi,


I would like to ensure that after the file is saved,
the attributes of the file are changed such that:

1. It becomes READ-ONLY.
2. It cannot be deleted.

Please show me the VBA code that I can incorporate to the above to
accomplish this.

Thanks,
Luther


Does this help?

This example uses the SetAttr statement to set attributes for a file.

SetAttr "TESTFILE", vbHidden ' Set hidden attribute.
SetAttr "TESTFILE", vbHidden + vbReadOnly ' Set hidden and read-only
' attributes.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protecting a file from Copy/Paste ReportSmith Excel Discussion (Misc queries) 2 July 20th 07 06:38 PM
Protecting an Excel file CEP77 Excel Discussion (Misc queries) 3 April 23rd 07 10:21 PM
Protecting a file in Excel 2003 KrisP Excel Discussion (Misc queries) 1 November 9th 06 06:08 PM
Protecting Excel file to prevent changes simmerdown Excel Discussion (Misc queries) 1 April 19th 06 10:29 PM
protecting a file from deletion pmcgr0arty Excel Discussion (Misc queries) 1 March 7th 06 07:39 PM


All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"