Druckmakro gesucht
12.03.2004 17:18:39
Juergen
habe diese beiden Makros die mir bei Aufruf Terminfälligkeiten und Terminüberfälligkeiten nach einander über MSG Boxen anzeigen.
Wie bekomme ich diese daten nun über ein 3tes Makro ausgedruckt und wie müsste dieses Makro aussehen?
Danke allen im vorraus!
Sub Termin()
Dim nam As String
Dim Datum1 As Date, z As Long
Dim col As Long
z = 3
Datum1 = Format(Now(), "dd.mm.yy")
Do While Cells(z, 3) größer/Kleiner ""
For col = 4 To 14 'D bis N
If IsDate(Cells(z, col)) Then
nTage = Cells(z, col) - Datum1
If nTage >= 1 And nTage <= 28 Then _
MsgBox "Achtung ! Es steht ein " & Cells(1, col) & "Termin" & " mit Herr/Frau " & (Cells(z, 2)) & " " & (Cells(z, 3)) & " am " & Cells(z, col) & "." & vbCr & _
"Bis dahin sind es noch " & nTage & " Tage."
End If
End If
Next col
z = z + 1
Loop
End Sub
Sub Terminüberfälligkeit()
Dim nam As String
Dim Datum1 As Date, z As Long
Dim col As Long
z = 3
Datum1 = Format(Now(), "dd.mm.yy")
Do While Cells(z, 3) größer/kleiner ""
For col = 4 To 14 'D bis N
If IsDate(Cells(z, col)) Then
nTage = Datum1 - Cells(z, col)
If nTage >= 1 And nTage <= 28 Then _
MsgBox "Achtung ! Sie haben ein " & Cells(1, col) & " versäumt mit Herr/Frau " & (Cells(z, 2)) & " " & (Cells(z, 3)) & " am " & Cells(z, col) & "." & vbCr & _
"Der Termin war fällig vor " & nTage & " Tage."
End If
Next col
z = z + 1
Loop
End Sub
mfg
Jürgen