[RESOLVED] NewPassword command in Excel VB
Does 'NewPassword' command have any use in Excel VB?
My problem is that I have a 'Read-Only' template user form and this form is populated with various bits of data.
I want to then save the user form with the data to another folder but not as read only.
My code as it stands now (saving amended form as 'Read-Only') -
VB Code:
With activeworkbook
.SaveAs ("S:\Finance\Finance\Form 19 Jan 06")
I know I can add/remove the password by specifying after file name, but before the password comes FileFormat. Do I have to specify this as well or can I use -
VB Code:
.SaveAs ("S:\Finance\Finance\Form 19 Jan 06"),"",
to remove the password.
Thanks
Re: NewPassword command in Excel VB
It should not be saved with a password unless specified. But if it doesnt then use a vbNullstring or "".
VB Code:
ActiveWorkbook.SaveAs Filename:="C:\Test.xls", Password:="123"
'Or
ActiveWorkbook.SaveAs Filename:="C:\Test.xls", Password:=""
Re: NewPassword command in Excel VB