I have an existing Outlook form.
Can I use events of this form with VBA.
for example, when someone replies I want to run a module.
:confused:
Printable View
I have an existing Outlook form.
Can I use events of this form with VBA.
for example, when someone replies I want to run a module.
:confused:
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
pete
My problem is that the code in the form code is VBScript and I need VBA in order to run exe file that locks a workstation.
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
Thanks, I will try it
It's working :)
Thanks
Is it possible for you to send me the code which generated the exe file for further developments?
Your name will apear, of course, as the author of the code ;)