Have one more question for a unique setup. I know that my code is very much not efficient, but I understand it and thats important to me. Here is what I'm trying to do. When the user clicks the CommandButton1, Excel verifies each textbox has information in it. If so, the last step is to check and see if the one box has "LAT" written in it. If so, it will pop open another userform which is just used as an informational popup. I would like this one to be timed. I have tried, but my lack of vba knowledge if hindering my ability to get this to function like I'd like. Any help would be appreciated.
Code:
Private Sub CommandButton1_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Test Plan")
With ws
ActiveSheet.Unprotect Password:="TEST"
.Range("c3") = Me.Description.Value
.Range("i3") = Me.RespEngAppr.Value
.Range("l3") = Me.EngPhone.Value
.Range("bz1") = Me.TestEng.Value
.Range("bz2") = Me.ProjectNo.Value
.Range("bz3") = Me.AltContact.Value
.Range("bz4") = Me.AltPhone.Value
.Range("bz8") = Me.DueDate.Value
.Range("U8") = Me.TONo.Value
.Range("D1").Value = ComboBox1.Value
'Coding for error message to pop up for lack of inputted data
If Me.TONo.Value = "" Then
MsgBox "You must complete the TO No field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.ComboBox1.Value = "" Then
MsgBox "You must complete the Test Type field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.Description.Value = "" Then
MsgBox "You must complete the Description field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.RespEngAppr.Value = "" Then
MsgBox "You must complete the Responsible Engineer field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.EngPhone.Value = "" Then
MsgBox "You must complete the Engineer Phone field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.TestEng.Value = "" Then
MsgBox "You must complete the Test Engineer field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.ProjectNo.Value = "" Then
MsgBox "You must complete the Project No. field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.AltContact.Value = "" Then
MsgBox "You must complete the Alternate Contact field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.AltPhone.Value = "" Then
MsgBox "You must complete the Alternate Contact Phone field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.DueDate.Value = "" Then
MsgBox "You must complete the Due Date field before Inputting Data", vbCritical
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
Exit Sub
End If
If Me.ComboBox1.Value = "LAT" Then
LAT_Notice.Show
Application.Wait (Now + TimeValue("00:00:02"))
Exit Sub
End If
' End of Coding for error message to pop up for lack of inputted data
ActiveSheet.Protect Password:="TEST", AllowInsertingRows:=True, AllowDeletingRows:=True
End With
End Sub