[AccessD] VBA question

Bryan Carbonnell Bryan_Carbonnell at cbc.ca
Thu Apr 24 09:26:08 CDT 2003


> it on it's own.  They cannot do that with a VBA function/sub.  There has to
> be an event that calls the function or sub (or an event has to occur to fire
> the code within an event).  They could use the immediate window to fire

Not true in Word and Excel Drew.

You can assign a procedure to a keyboard shortcut, so you don't need an event to fire the procedure.

Bryan Carbonnell
bryan_carbonnell at cbc.ca

>>> DWUTKA at marlow.com 23-Apr-03 7:59:28 PM >>>
Yes, a macro can be run from an event.  However, the user can flat out run
it on it's own.  They cannot do that with a VBA function/sub.  There has to
be an event that calls the function or sub (or an event has to occur to fire
the code within an event).  They could use the immediate window to fire
code, but the immediate window is part of the VBE, and not something the
average user knows about.

Along those lines, macros cannot require arguments.  Yes, macros can have
condition statements, and they can look for values, but when you run a
macro, it's run, you don't have to 'give' it particular values to run it.
(Thus the 'Run' button).  VBA procedure CAN require arguments, which must be
supplied (unless they are optional) in order to run.




More information about the AccessD mailing list