Encrypt 2007 xlsx file using VBA

W

WhytheQ

Is it possible to Encrypt an xlsx file using VBA?
(I'm creating 50 or 60 files on the fly and attaching them to emails -
manually adding passwords will be painful!)

Any help much appreciated.
Jason.
 
J

Jim Rech

The third argument of the workbook SaveAs method is Password, so you can use
that to encrypt workbooks. See help for SaveAs.

--
Jim
| Is it possible to Encrypt an xlsx file using VBA?
| (I'm creating 50 or 60 files on the fly and attaching them to emails -
| manually adding passwords will be painful!)
|
| Any help much appreciated.
| Jason.
 

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

Top