[AccessD] VBA question

Drew Wutka DWUTKA at marlow.com
Fri Apr 25 01:19:38 CDT 2003


Um right, Bryan, that's a macro you are assigning the keyboard shortcut too,
not the actual function or sub.  

Drew

-----Original Message-----
From: Bryan Carbonnell [mailto:Bryan_Carbonnell at cbc.ca]
Sent: Thursday, April 24, 2003 9:26 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] VBA question


> 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.


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list