I have nothing in the workbook yet, I am still just working on the coding. Here is what I have so far if it helps:
Private Sub UserForm_Initialize()
'Populate Date Field
Date1.Value = Format(Date, "mm/dd/yyyy")
End Sub
Private Sub Task_Change()
Select Case Me.Task
Case "Litigation":
Entirefile.Visible = True
Medicalonly.Visible = True
Bandedsection.Visible = True
mailtocounsel.Visible = True
retainattorney.Visible = True
suittransmittal.Visible = True
suitack.Visible = True
printnotes.Visible = True
statesearch.Visible = True
searchacct.Visible = True
copyoptions.Visible = True
litoptions.Visible = True
Case "Photocopy":
Entirefile.Visible = True
Medicalonly.Visible = True
Bandedsection.Visible = True
mailtocounsel.Visible = True
copyoptions.Visible = True
Case Else:
Entirefile.Visible = False
Medicalonly.Visible = False
Bandedsection.Visible = False
mailtocounsel.Visible = False
copyoptions.Visible = False
retainattorney.Visible = False
suittransmittal.Visible = False
suitack.Visible = False
printnotes.Visible = False
statesearch.Visible = False
searchacct.Visible = False
litoptions.Visible = False
End Select
End Sub
Private Sub Submit_Click()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim repfunc As Variant
repfunc = Application.WorksheetFunction.VLookup(Rep.Value, Worksheets("Form Data").Range("A:B"), 2, False)
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = repfunc
.Subject = "Request"
sMsgBody = "Please review the below request information" & vbCr & vbCr & vbCr
sMsgBody = sMsgBody & "Todays Date -- " + Me.Date1.Value & vbCr & vbCr
sMsgBody = sMsgBody & "Rep's Name -- " + Me.Rep.Value & vbCr & vbCr
sMsgBody = sMsgBody & "Department -- " + Me.Number.Value & vbCr & vbCr
sMsgBody = sMsgBody & "Requested Item -- " + Me.Claimant.Value & vbCr & vbCr
sMsgBody = sMsgBody & "Thank you" & vbCr & vbCr
sMsgBody = sMsgBody & Me.Rep.Value
.body = sMsgBody
.Send
End With
On Error GoTo 0
MsgBox "The e-mail was successfully sent!", vbInformation, "Finish"
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Private Sub Clear_Click()
Rep.Value = Null
Number.Value = Null
Task.Value = Null
Claimant.Value = Null
Comments.Value = Null
Entirefile.Value = Null
Medicalonly.Value = Null
Bandedsection.Value = Null
mailtocounsel.Value = Null
retainattorney.Value = Null
suittransmittal.Value = Null
suitack.Value = Null
printnotes.Value = Null
statesearch.Value = Null
searchacct.Value = Null
End Sub
Bookmarks