MLH wrote:
The following function declaration confuses me...
Public Function IsEMailAddress(ByVal sEmail As String, Optional ByRef
sReason As String) As Boolean
I tried pasting it and its code into an Access 2.0 module. I was
unsuccessful. I had to remove the following...
"Public"
"Optional ByRef"
"As Boolean"
I replaced the "As Boolean" with "As Integer". Then it all worked.
What's the "Public" and "Optional ByRef" for anyway?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
"Public" means the function is "visible" to all possible calling
routines (the Public is allowed to use it).
"Optinal ByRef" means the parameter is an optional parameter (it may, or
may not be used by the calling routine) and that instead of the actual
parameter value there is a pointer to the value. A pointer is an
address in the computer's memory that "points" to the variable value
(or, sometimes, another pointer - don't worry about it). The converse
to ByRef is ByVal which means the actual parameter value has been passed
to the function/sub.
"As Boolean" means the value returned by the Function will be a Boolean
(True/False - in VBA True = -1; False = 0) value.
I believe all these terms were introduced into Access VBA in
Access/Office 97 - not sure. That's why they don't work in Access 2.
Ya really have to upgrade to a newer version :-).
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQijUToechKqOuFEgEQK5SACgwixwE11OdugS8vjTob10VW nT/UcAn0lj
AObQXErYVkkXy2cJRHL6Abg3
=5kl6
-----END PGP SIGNATURE-----