Private Sub CmdGroup_Click()
Dim r As Range
With CmdGroup
With Sheets("Tracker")
Set r = .Cells.Find(CmdGroup.Caption, after:=.Cells(1), LookIn:=xlValues, lookat:=xlWhole)
If r Is Nothing Then
If CmdGroup.BackColor = 50000 Then CmdGroup.BackColor = &H8000000F Else CmdGroup.BackColor = 50000
UserForm1.CountCommandButton
Else
CmdGroup.BackColor = r.Offset(, 1).Interior.Color
MsgBox "Issue with " & r.Offset(, 1)
End If
End With
End With
End Sub
Private Sub CommandButton1_Click()
Dim NextRow As Integer, ldate As String, r As Range, mycolor As Long, r2 As Range
ldate = Format(Date, "mm/dd/yyyy")
If TextBox1.Value <> "" Then
With Worksheets("Tracker")
If ComboBox2 = "NO" Then
NextRow = Application.CountA(.Range("A:A")) + 1
.Cells(NextRow, 1) = ldate
.Cells(NextRow, 2) = UserForm3.TextBox1
.Cells(NextRow, 3) = UserForm3.ComboBox1
With .Range("I:I")
Set r2 = .Cells.Find(UserForm3.ComboBox1)
mycolor = r2.Interior.Color
End With
.Cells(NextRow, 3).Interior.Color = mycolor
ElseIf ComboBox2 = "Yes" Then
Set r = .Cells.Find(TextBox1, after:=.Cells(1), LookIn:=xlValues, lookat:=xlWhole)
.Cells(r.Row, 2) = UserForm3.TextBox1 & " Resolved " & ldate
.Cells(r.Row, 3).Interior.Pattern = xlNone
End If
End With
Unload Me
End If
End Sub
Kind regards
Leo
Bookmarks