Hello,
I have a userform that transfers a bunch of data to a sheet on a button click. My codes used to work perfectly before and recently, it's been giving me troubles on button click. Microsoft consistently stops responding.
For some odd reason, MS Excel Stops responding right when it's time to transfer the value entered in "txtgroupID" textbox to the sheet (see red text below). When I disable this line and try to run it, everything works fine. What am I missing?
Thanks in advance!!
Emmanuel
I have a userform that transfers a bunch of data to a sheet on a button click. My codes used to work perfectly before and recently, it's been giving me troubles on button click. Microsoft consistently stops responding.
For some odd reason, MS Excel Stops responding right when it's time to transfer the value entered in "txtgroupID" textbox to the sheet (see red text below). When I disable this line and try to run it, everything works fine. What am I missing?
Code:
Private Sub cmdsubmit_Click()
Sheets("Form").Unprotect Password:="password"
'CONTRACT INFO
Sheets("Form").Range("H4") = txtOPCProjectName.Value
Sheets("Email").Range("C1") = txtOPCProjectName.Value
Sheets("Form").Range("H5") = txtOPCProjectNumber.Value
Sheets("Email").Range("C2") = txtOPCProjectNumber.Value
Sheets("Form").Range("N9") = txtOPCProjectNumber.Value
Sheets("Form").Range("P5") = txtID.Value
[COLOR=#ff0000][B]Sheets("Form").Range("H6") = txtGroupID.Value [/B][/COLOR]
Sheets("Email").Range("C3") = txtGroupID.Value
Sheets("Form").Range("H7") = cmbReviewer.Value
Sheets("Email").Range("C4") = cmbReviewer.Value
Sheets("Form").Range("H8") = txtDateReviewed.Value
Sheets("Email").Range("C5") = txtDateReviewed.Value
Sheets("Form").Range("H9") = txtCCN.Value
Sheets("Email").Range("C6") = txtCCN.Value
Sheets("Form").Range("H10") = cmbCT.Value
Sheets("Email").Range("C7") = cmbCT.Value
Sheets("Form").Range("H11") = cmbCTN.Value
Sheets("Email").Range("C8") = cmbCTN.Value
Sheets("Form").Range("H12") = cmbIT.Value
Sheets("Email").Range("C9") = cmbIT.Value
Sheets("Form").Range("H13") = txtPN.Value
Sheets("Email").Range("C10") = txtPN.Value
Sheets("Form").Range("H14") = txtECN.Value
Sheets("Email").Range("C11") = txtECN.Value
End Sub
Thanks in advance!!
Emmanuel