Sub
Auto_open()
Application.OnTime Now + TimeValue(
"00:02:00"
),
"Autostart"
Application.OnTime TimeValue(
"12:15:00"
),
"Autostart"
Dim
Bereich
As
Range
Dim
Zelle
As
Range
Dim
x
As
Range
Set
Bereich = Range(
"F:F"
)
For
Each
Zelle
In
Bereich
If
Zelle =
""
Then
Exit
Sub
If
Zelle <=
Date
- Vorlauf
Then
Zelle.EntireRow.Copy
.SendMail
"emailadresse"
,
"Aktuelle Instandhaltungsmaßnahme/n"
End
If
Next
Dim
Meldung
As
String
Dim
Vorab
As
Integer
Dim
n
As
Integer
Meldung =
""
Vorab = 2
If
Date
>= Worksheet.Cells().Value - Vorab
Then
Meldung = Meldung & blatt.Cells(n, 9).Value
End
If
If
Meldung <>
""
Then
MsgBox (
"Folgende Wartungen sind binnen "
) & Vorab & (
"durchzuführen:"
) & Meldung
Else
MsgBox
"Es stehen in "
& Vorab &
"keine Wartungen an"
End
If
Application.Quit
ThisWorkbook.Close
End
Sub
Sub
Test()
Dim
a
a = Sheets(
"datenbasis"
).Columns(
"A:G"
).Find(x > 0).Row
MailDoc.sendto = Recipient &
", "
& cc
MsgBox a
End
Sub
Sub
FindenUndKopieren()
Dim
zeile
Dim
x
If
zeile = Sheets(
"datenbasis"
).Columns(
"H:H"
).Find(x < 0).Row
Then
Else
MsgBox
"nichts"
End
If
End
Sub
Sub
Bspw1()
Dim
s
As
Range
s = (
Date
<= 0)
Set
s = Sheets(
"datenbasis"
).Columns(
"G:G"
).Find(s, lookat:=xlPart).Row
Bereich.
Select
End
Sub
Sub
xy()
Dim
rngZelle
As
Range
Dim
zeile
As
Range
Dim
zeileninhalt
As
Range
zeileninhalt = ActiveSheet.Range(
"A1:C1"
).Value
x =
Date
- 7
For
Each
rngZelle
In
ActiveSheet.Range(
"G:G"
)
If
rngZelle =
""
Then
Exit
Sub
If
rngZelle <= x
Then
MsgBox zeileninhalt
End
If
Next
End
Sub
Sub
t()
Dim
raZelle
As
Range
Set
raZelle = Worksheets(
"1_datenbasis"
).Range(Cells(1, 6), Cells(IIf(IsEmpty(Cells(6, Columns.Count)), _
Cells(6, Columns.Count).
End
(xlToLeft).Column, Columns.Count))).Find(
Date
, lookat:=xlWhole)
If
Not
raZelle
Is
Nothing
Then
MsgBox
"Achtung, heute liegt ein Termin an"
Set
raZelle =
Nothing
End
Sub
Sub
a()
MsgBox Range(EntireRow).Text
End
Sub