+ Reply to Thread
Results 1 to 2 of 2

Export CSV File, set Windows Read-Only attribute

  1. #1
    InNeedOfHelp!
    Guest

    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. #2
    Jim Rech
    Guest

    Re: 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!" <[email protected]> wrote in message
    news:[email protected]...
    |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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1