Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot remove Read Only Attribute | Excel Discussion (Misc queries) | |||
Cannot remove read only attribute | Excel Discussion (Misc queries) | |||
Tried changing a file attribute from read only but I get error msg | Excel Discussion (Misc queries) | |||
Read Only attribute disappears | Excel Discussion (Misc queries) | |||
Saving a file within a macro but only when it does not have a read only attribute | Excel Programming |