the form should have events for itself and any controls on the form, if you have a commandbutton it should have a click event.
at the top of the forms code widow should be 2 dropdown combos, the left one selects the controls, the right one the events for the selected control
i am not really familiar with vbscript, but i believe you can use wscript.shell to run an exe file, but as the lockworkstation was an api call it would have to be put into a separate exe file first
Set wshell = CreateObject("WScript.Shell")
wshell.Run "c:\scripts\test.exe"
edit: i am attaching an a zipped exe of the lockworkstation function
it is totally untested, up to you if you use it
pete
Last edited by westconn1; Jun 23rd, 2005 at 10:09 PM.