View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Carl Willems Carl Willems is offline
external usenet poster
 
Posts: 4
Default VBA to Extract time that user logged onto Windows

Try using:

Private Declare Function GetTickCount Lib "kernel32" () As Long
myTime = GetTickCount

in myTime you'll get the elapsed time since Windows started in
milliseconds. I don't know whether it is when the machine started, or when
the user logged on, can be different when more than one user is using the
machine, you'd have to test that.

grds,
Carl

macroapa wrote in news:e67c85ef-668e-48ce-9732-
:

Hi, I know how to get the name of the current user logged onto
Windows, but I'd like to extract the time that the user logged onto to
the windows session.

This must be possible, but try as I might, I just cant find anything
on the net.

Can anyone help?

Thanks