----------------------------------------------------------------------------------
This template is basic. Please see a much more sophisticated one below. It uses custom functions and other goodies.
----------------------------------------------------------------------------------
Option Explicit
Private Sub cmdCancel_Click()
Unload Me
ActiveDocument.Close SaveChanges:=False
End Sub
Private Sub UserForm_Initialize()
With cmb_ref_doc_designation
.AddItem ", M.D."
.AddItem ", D.O."
.AddItem ", Ph.D."
.AddItem ", AuD"
.AddItem ""
End With
With cbo_sex
.AddItem "male"
.AddItem "female"
.AddItem "unspecified"
End With
End Sub
Private Sub btn_date_click_Click()
End Sub
Private Sub btn_no_x_see_attached_Click()
ActiveDocument.Shapes("Group 58").Select
Selection.ShapeRange.Line.Visible = msoFalse
Application.ScreenUpdating = True
End Sub
Private Sub btn_x_expct_more_2_follow_Click()
ActiveDocument.Shapes("Group 61").Select
Selection.ShapeRange.Line.Visible = msoTrue
Application.ScreenUpdating = True
End Sub
Private Sub btn_x_expct_nothing_2_followw_Click()
ActiveDocument.Shapes("Group 61").Select
Selection.ShapeRange.Line.Visible = msoFalse
Application.ScreenUpdating = True
End Sub
Private Sub btn_x_see_attached_Click()
ActiveDocument.Shapes("Group 58").Select
Selection.ShapeRange.Line.Visible = msoTrue
Application.ScreenUpdating = True
End Sub
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
Frame1.Visible = True
Else: Frame1.Visible = False
End If
End Sub
Private Sub CommandButton4_Click()
Frame1.Visible = True
End Sub
Private Sub Enter_Click()
Dim current As Variant
If CheckBox1.Value = True Then
current = txtbox_dt_of_letter_mm.Value & "/" & txtbox_dt_of_letter_dd.Value & "/" & txtbox_dt_of_letter_yyyy.Value
Else
current = DateTime.Now()
End If
With ActiveDocument
.Bookmarks("recipient_doc").Range.Text = txtbox_ref_doc_fname.Value & " " & txtbox_ref_doc_mname.Value & " " & txtbox_ref_doc_lname.Value & cmb_ref_doc_designation.Value
.Bookmarks("date").Range.Text = current
.Bookmarks("patient").Range.Text = txtbox_pt_firstname.Value & " " & txtbox_pt_lastname.Value
.Bookmarks("dob").Range.Text = txtbox_pt_dob_mm.Value & "/" & txtbox_pt_dob_dd.Value & "/" & txtbox_pt_dob_yyyy.Value
.Bookmarks("date_of_service").Range.Text = txtbox_date_service_mm.Value & "/" & txtbox_date_service_dd.Value & "/" & txtbox_date_service_yyyy.Value
.Bookmarks("chief_complaint").Range.Text = txt_chief_complaint.Value
.Bookmarks("physical_findings").Range.Text = txt_physical_findings.Value
.Bookmarks("diagnosis").Range.Text = txt_diagnosis.Value
.Bookmarks("treatment_plan").Range.Text = txt_treatment_plan.Value
.Bookmarks("see_attached_details").Range.Text = txtbox_see_attached_comments.Value
.Bookmarks("expect_detailed_letter_comments").Range.Text = txtbox_detailed_letter_comments.Value
End With
Application.ScreenUpdating = True
Unload Me
End Sub
Private Sub Label3_Click()
End Sub
Private Sub UserForm_Click()
End Sub
No comments:
Post a Comment