'=========================================================== Sub zGen_LockPC 'This function locks your PC 'you might want to do this if you are leaving your PC running tests overnight unattended 'Example of Usage: ' Call zGen_LockPC Dim oShell, sCommand Set oShell = CreateObject("WScript.Shell") sCommand = "%windir%\SYSTEM32\rundll32.exe user32.dll,LockWorkStation" oShell.Run sCommand, 0, False Set oShell = Nothing End Sub '===========================================================