AW: Textbox5=heute() Email senden
10.09.2013 17:27:57
Rudi
Hallo,
1. die Mailadresse steht in Textbox13
2. die Textbox5 erst ganz am Schluss füllen, sonst ist die Mailadresse noch "".
Private Sub TextBox5_Change()
If Month(CDate(TextBox5)) = Month(Date) And Day(CDate(TextBox5)) = Day(Date) Then
SendMail_Outlook _
TextBox13, _
"Geburtstagswünsche", _
"Herzlichen Glückwunsch zum Geburtstag" _
& " wünschen von ganzem Herzen" _
& " die Firma Kiehl." _
& vbLf & vbLf _
& "PS. und viel Gesundheit oben drauf!!!", _
"", _
"", _
End If
End Sub
Private Sub ListBox1_Click()
Dim lng As Integer
If boVar = True Then Exit Sub
lng = frm_Kundenliste.ListBox1.Column(13)
With frm_Kundenliste
TextBox1.Value = Cells(lng, 1).Value
TextBox2.Value = Cells(lng, 2).Value
TextBox3.Value = Cells(lng, 3).Value
TextBox4.Value = Cells(lng, 4).Value
TextBox6.Value = Cells(lng, 6).Value
TextBox7.Value = Cells(lng, 7).Value
TextBox8.Value = Cells(lng, 8).Value
TextBox9.Value = Cells(lng, 9).Value
TextBox10.Value = Cells(lng, 10).Value
TextBox11.Value = Cells(lng, 11).Value
TextBox12.Value = Cells(lng, 12).Value
TextBox13.Value = Cells(lng, 13).Value
.cmdDatenNeu.Visible = False
.cmdÄnderung.Visible = True
.cmdlösch.Visible = True
TextBox5.Value = Cells(lng, 5).Value
End With
End Sub
Nebenbei solltest du noch dafür sorgen, dass der Kunde nicht jedesmal eine Mail bekommt, wenn du ihn aufrufst, sondern nur 1x im Jahr.
Gruß
Rudi