M
Moselle
below is my code. when i clock my macro button. it will automaticall
save my excel sheet but i can only open it with password. whenever i tr
to open it with my wrirespassword. it just prompt the CAPS LOCKs error
im new to excel and i totally have no idea why this happen when th
password works well as i need to open it in writeable version wit
wrirespassword. if i remove the password:= and just used th
wrirespassword. it will auto save as open excel without encryp
anything. please help me on this
Sub SaveInvWithNewName()
Dim NewFN As String
' Copy Invoice to a new workbook
ActiveSheet.Unprotect 111
ActiveSheet.Copy
NewFN = "Users/cs/Desktop" & Range("E3").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat _
:=xlNormal, Password:="222", WriteResPassword:="333", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Close
NextInvoice
ActiveSheet.Protect 111
End Su
save my excel sheet but i can only open it with password. whenever i tr
to open it with my wrirespassword. it just prompt the CAPS LOCKs error
im new to excel and i totally have no idea why this happen when th
password works well as i need to open it in writeable version wit
wrirespassword. if i remove the password:= and just used th
wrirespassword. it will auto save as open excel without encryp
anything. please help me on this
Sub SaveInvWithNewName()
Dim NewFN As String
' Copy Invoice to a new workbook
ActiveSheet.Unprotect 111
ActiveSheet.Copy
NewFN = "Users/cs/Desktop" & Range("E3").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat _
:=xlNormal, Password:="222", WriteResPassword:="333", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Close
NextInvoice
ActiveSheet.Protect 111
End Su