AW: Speicher Datum und Autor im Sheet anzeigen
22.06.2009 12:19:36
Hajo_Zi
Haloo Sabine,
Option Explicit
Dim LoLetzte As Long
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
With Worksheets("Tabelle3")
LoLetzte = IIf(IsEmpty(.Cells(.Rows.Count, 1)), .Cells(Rows.Count, 1).End(xlUp).Row, . _
Rows.Count) + 1
.Cells(LoLetzte, 1) = Now
.Cells(LoLetzte, 2) = Environ("Username")
End With
End Sub
Private Sub Workbook_Open()
Dim LoI As Long
Dim LoJ As Long
Dim StMeldung As String
With Worksheets("Tabelle3")
LoLetzte = IIf(IsEmpty(.Cells(.Rows.Count, 1)), .Cells(Rows.Count, 1).End(xlUp).Row, . _
Rows.Count) + 1
If LoLetzte > 10 Then LoJ = LoLetzte - 11
For LoI = LoJ + 1 To LoLetzte
StMeldung = StMeldung & .Cells(LoI, 1).Text & " " & .Cells(LoI, 2) & Chr(13)
Next LoI
MsgBox StMeldung
End With
End Sub
Open kannst Du entfallen lassen falls es beim öffnen nicht angezeigt werden soll.