Private Sub ComboBox2_Change()
Dim r As Integer
r = 2
'Load form fields
If OptionIssue = True Then
Do Until Sheet3.Range("B" & r - 1) = ComboBox2.Text
If Sheet3.Range("B" & r) = ComboBox2.Text Then
TextBox 1 = Sheet3.Range("B" & r).Offset(1, 0)
TextBox 6 = Sheet3.Range("B" & r).Offset(1, 0)
TextBox 2 = Sheet3.Range("B" & r).Offset(2, 0)
r = r + 1
Else
r = r + 1
End Sub
End Sub
Private Sub CommandButton2_Click()
Unload UserForm3
End Sub
Private Sub CommandButton3_Click()
Dim olApp As Outlook.Application
Dim olMail As MailItem
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = "xxx@hotmail.com"
.Subject = "Your case reply"
.Display
End With
Set olMail = Nothing
Set olApp = Nothing
End Sub
Private Sub UserForm_Acivate()
OptionIssue = True
ComboBox2.Clear
Dim row As Integer
row = 2
Do Until Sheet3.Range("A" & row + 4) = ""
ComboBox2.AddItem Sheet3.Range("B" & row + 2)
row = row + 5
Loop
TextBox1 = ""
TextBox2 = ""
TextBox6 = ""
ComboBox2 = ""
End Sub
Private Sub OptionIssue_Click()
TextBox1 = ""
TextBox6 = ""
TextBox2 = ""
'Load list of templates
'Starts Search engine
ComboBox2.Clear
Dim row As Integer
row = 2
Do Until Sheet3.Range("A" & row + 4) = ""
ComboBox2.AddItem Sheet3.Range("B" & row + 2)
row = row + 5
Loop
End Sub