Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
below is my code. when i clock my macro button. it will automatically save my excel sheet but i can only open it with password. whenever i try 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 the password works well as i need to open it in writeable version with wrirespassword. if i remove the password:= and just used the wrirespassword. it will auto save as open excel without encrypt 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 Sub |
#2
![]() |
|||
|
|||
![]()
ok!! i did it somehow loll~
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Windows Query working on some computer, and not working on others?!? | Excel Programming | |||
WriteResPassword | Excel Programming | |||
WriteResPassword... | Excel Programming | |||
Calculate working days but change working week | Excel Discussion (Misc queries) | |||
Setting Password & WriteResPassword | Excel Programming |