Once an AllowEditRange object has been returned, you can use the ChangePassword method to change the password to access a range that can be edited on a protected worksheet.
In this example, Microsoft Excel allows edits to range "A1:A4" on the active worksheet, notifies the user, then changes the password for this specified range and notifies the user of this change.
Visual Basic for Applications
Dim wksOne As Worksheet
Dim wksPassword As String
Set wksOne = Application.ActiveSheet
wksPassword = InputBox ("Enter password for the worksheet")
' Establish a range that can allow edits
' on the protected worksheet.
MsgBox "Cells A1 to A4 can be edited on the protected worksheet."
' Change the password.
wksPassword = InputBox ("Enter the new password for the worksheet")
MsgBox "The password for these cells has been changed."