For the record I did a search on passwords, read them all. Also have had my nose in Excel help file. Trying, but stuck. I know about Sub Form_Load(), but not sure how to implement it.
I'll bet I've gone about this wrong, but here's what I've got-
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
UserForm1.Show
End Sub
Private Sub CommandButton1_Click()
If TextBox1 = "pw" Then
MsgBox "Password Accepted", vbInformation
Unload Me
Else
If TextBox1<> "pw" Then
MsgBox "Invalid Password", vbOKOnly + vbCritical
Unload Me
***What Can I put here to abort the save?***
End If
End If
End Sub
This message was edited by dsnbld on 2002-05-11 03:09
I'll bet I've gone about this wrong, but here's what I've got-
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
UserForm1.Show
End Sub
Private Sub CommandButton1_Click()
If TextBox1 = "pw" Then
MsgBox "Password Accepted", vbInformation
Unload Me
Else
If TextBox1<> "pw" Then
MsgBox "Invalid Password", vbOKOnly + vbCritical
Unload Me
***What Can I put here to abort the save?***
End If
End If
End Sub
This message was edited by dsnbld on 2002-05-11 03:09