ich habe folgenden Code geschrieben:
Private Sub CommandButton1_Click()
Dim objOutlook As Outlook.Application
Dim apptOutlook As Outlook.AppointmentItem
Range("C5").Select
Do Until ActiveCell.Value = "Ende"
If ActiveCell.Value "" Then
Set objOutlook = CreateObject("Outlook.Application")
Set apptOutlook = objOutlook.CreateItem(olAppointmentItem)
With apptOutlook
.Subject = ActiveCell.Value
.Start = Format(ActiveCell.Offset(0, -2), "dd.mm.yyyy") & " 08:00"
.Duration = 60
.ReminderMinutesBeforeStart = 1440
.ReminderPlaySound = True
.ReminderSet = True
.Save
End With
End If
ActiveCell.Offset(1, 0).Select
Set apptOutlook = Nothing
Set objOutlook = Nothing
Loop
End Sub
Jetzt hätte ich gern noch, dass nach dem Loop wieder die erste Zelle (C5) ausgewählt wird, eine Zelle nach rechts gesprungen wird und dann der ganze Loop nochmal abläuft: das ganze Prozedere soll circa 15 Mal wiederholt werden bis zur Spalte R, wobei es hier auch besser wäre wenn es bis zu einem "Ende" läuft, um die Tabelle noch erweitern zu können. Gibt es dafür ne elegante Lösung oder muss ich via Copy and Paste das ganze zwanzig mal untereinander schreiben?Gruß Kurt