suche verzweifelt nach der Möglichkeit die Zeit zu ermitteln, zu der man sich Morgens im Netzwerk angemeldet hat. Wenn möglich auch die Endzeit vom Vortag.
Das Ganze soll zur meiner eigenen Zeiterfassung dienen.
Vielen Dank vorab
Herbert
Option Explicit
Public Sub Seit_wann_angemeldet()
Dim LoginProfiles
Dim Profil
Dim a
Set LoginProfiles = GetObject("winmgmts:").InstancesOf("Win32_NetworkLoginProfile")
For Each Profil In LoginProfiles
a = Profil.lastlogon
If a <> "" Then
MsgBox Profil.Name & vbCrLf & _
Mid(a, 7, 2) & "." & Mid(a, 5, 2) & "." & Mid(a, 1, 4) & " " & _
Mid(a, 9, 2) & ":" & Mid(a, 11, 2) & ":" & Mid(a, 13, 2)
End If
Next
End Sub