Save File With Hidden Property

  • I have an excel file which is in windows explorer has its property set to hidden.


    I have another excel file, with some Vba in it, which opens the hidden file, inserts some data into it, saves the file and closes it.

    Code
    ActiveWorkbook.Save
        ActiveWorkbook.Close


    This all works, except that the hidden property is lost in the process.


    Is there a way of saving the file, and keeping the hidden property? This is just so that users cant see the file and accidently open it.

  • Re: Save File With Hidden Property


    julian_t,


    I did a Google search for "set windows file property with vba" and got several promising leads. Try a search and look for some kind of API call (sounds too complicated for me).


    Good luck,
    Jim

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!