Hello,
I am new to this forum along with being new to Userforms and codes.
I have set up an Excel Userform, with 3 tabs at bottom of workbook. Mgmnt Ticket, Ticket Data Entry, and LookUpLists
1) Mgmnt Ticket - Password Protected but can not get the code to get through the password. If I remove the password,
then the Userform works fine. If I add the password back, I receive and error code (I have replaced the 3 locations
below that show "password" with my password that I use.
2) Ticket Data Entry tab: I have a command button to open the User Form. Works great!
3) LookUpLists tab: Password Protected Sheet - I do not want anyone to have access to it. Seems to be fine.
I need a userform that can take the data and place in my protected worksheet or into another work book.
I am stuck. Hoping someone may be able to help me.
'copy the data to the database
'use protect and unprotect lines,
' with your password "password"
' if worksheet is protected
With ws
' .Unprotect Password:="password"
.Cells(lRow, 1).Value = Me.cboDate.Value <<< ERROR MESSAGE ON THIS LINE
.Cells(lRow, 2).Value = Me.txtTime.Value
.Cells(lRow, 3).Value = Me.cboAMPM.Value
.Cells(lRow, 4).Value = Me.txtName.Value
.Cells(lRow, 3).Value = Me.cboSystem.Value
.Cells(lRow, 5).Value = Me.txtDescription.Value
' .Protect Password:="password"
End With
'clear the data
Me.cboDate.Value = ""
Me.txtTime.Value = ""
Me.cboAMPM.Value = ""
Me.txtName.Value = ""
Me.cboSystem.Value = ""
Me.txtDescription.Value = ""
Me.cboDate.SetFocus
End Sub
Help!
Judes
I am new to this forum along with being new to Userforms and codes.
I have set up an Excel Userform, with 3 tabs at bottom of workbook. Mgmnt Ticket, Ticket Data Entry, and LookUpLists
1) Mgmnt Ticket - Password Protected but can not get the code to get through the password. If I remove the password,
then the Userform works fine. If I add the password back, I receive and error code (I have replaced the 3 locations
below that show "password" with my password that I use.
2) Ticket Data Entry tab: I have a command button to open the User Form. Works great!
3) LookUpLists tab: Password Protected Sheet - I do not want anyone to have access to it. Seems to be fine.
I need a userform that can take the data and place in my protected worksheet or into another work book.
I am stuck. Hoping someone may be able to help me.
'copy the data to the database
'use protect and unprotect lines,
' with your password "password"
' if worksheet is protected
With ws
' .Unprotect Password:="password"
.Cells(lRow, 1).Value = Me.cboDate.Value <<< ERROR MESSAGE ON THIS LINE
.Cells(lRow, 2).Value = Me.txtTime.Value
.Cells(lRow, 3).Value = Me.cboAMPM.Value
.Cells(lRow, 4).Value = Me.txtName.Value
.Cells(lRow, 3).Value = Me.cboSystem.Value
.Cells(lRow, 5).Value = Me.txtDescription.Value
' .Protect Password:="password"
End With
'clear the data
Me.cboDate.Value = ""
Me.txtTime.Value = ""
Me.cboAMPM.Value = ""
Me.txtName.Value = ""
Me.cboSystem.Value = ""
Me.txtDescription.Value = ""
Me.cboDate.SetFocus
End Sub
Help!
Judes