Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Export CSV File, set Windows Read-Only attribute

I need to export a CSV file from an excel sheet with Window Read-Only
attributes (ie. when I right-click on the CSV file from folder view, I need
the Read-Only box checked).

Is there a way to do this with an Excel Marco?

My current code which does not do the functionality described above, is as
follows:
ActiveWorkbook.SaveAs "C:\Test\" + Filenamer, xlCSV, , password, True

Even if this code worked, it is read-only in the EXCEL sense right? I need
to be able to protect the contents even if I open the CSV file with Notepad
or Word.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Export CSV File, set Windows Read-Only attribute

You might check out the VB SetAttr function The file may have to be closed
for this to work.

--
Jim Rech
Excel MVP
"InNeedOfHelp!" wrote in message
...
|I need to export a CSV file from an excel sheet with Window Read-Only
| attributes (ie. when I right-click on the CSV file from folder view, I
need
| the Read-Only box checked).
|
| Is there a way to do this with an Excel Marco?
|
| My current code which does not do the functionality described above, is as
| follows:
| ActiveWorkbook.SaveAs "C:\Test\" + Filenamer, xlCSV, , password, True
|
| Even if this code worked, it is read-only in the EXCEL sense right? I need
| to be able to protect the contents even if I open the CSV file with
Notepad
| or Word.


Reply
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
Cannot remove Read Only Attribute Richard Hollister Excel Discussion (Misc queries) 6 April 20th 07 04:26 PM
Cannot remove read only attribute Colin Gough Excel Discussion (Misc queries) 2 September 27th 06 12:37 AM
Tried changing a file attribute from read only but I get error msg willymoore809 Excel Discussion (Misc queries) 5 June 5th 06 01:25 PM
Read Only attribute disappears Ken G. Excel Discussion (Misc queries) 1 December 2nd 04 12:32 AM
Saving a file within a macro but only when it does not have a read only attribute Alex Excel Programming 2 September 16th 03 04:19 PM


All times are GMT +1. The time now is 12:04 PM.

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

About Us

"It's about Microsoft Excel"