How to hide a text file using macro

  • Thread starter Thread starter shirley_kee
  • Start date Start date
S

shirley_kee

I've created a log file in text format when excel file is opened. The
text file contains directory of excel that I've opened and user name. I
want the text file to be hidden in order to prevent user from seeing it

Does anybody has any idea how to do it in Macro??
 
Unfortunately i dont know how to hide them but i figure you want to hide
it on a user drive so that when they open a file it can source back to
the "hidden" file and update the file. i know that you can set up a
macro to create the file and save it with a password and you can set
the password to equal what ever you like e.g
Sub Macro1()
Password = "MYPASSWORD"
ChDir "C:\...."
ActiveWorkbook.SaveAs Filename:= _
"C:\...\Book1.xls", FileFormat:= _
xlNormal, Password:="" + password + "", WriteResPassword:="" +
password + "", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub


Give that a shot.

If you ever find out how to hide a file with a macro post it please.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top