View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Excel to Lock Windows User Account?

Declare Function LockWorkStation Lib "user32.dll" () As Long

Sub a()
LockWorkStation
End Sub

--
Jim
wrote in message
ups.com...
Hello,

I am in need of getting Excel to lock the current windows account
so as the end user is required to type in their user name and password
to regain access to windows. The desired result can not be achived by
SendKeys for whatever reason. I need Excel to do the following...

Press the Windows Key and L at the same time...

any ideas?

Thanks!