[mso] Re: Excel Function to Access

  • From: "Ray Blake" <ray@xxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Fri, 4 Jun 2004 16:27:00 +0100

Really nice code, Jim. Take a bow.

Ray

------------------------------------
GR Business Process Solutions
Ray Blake
Head of Software Design
ray@xxxxxxxxx
Braedon
Newell Road
Hemel Hempstead
Herts HP3 9PD
tel: 01442 396518
fax: 01442 389353
www.grbps.com
------------------------------------


-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On
Behalf Of Jim Pettit
Sent: 04 June 2004 16:07
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Excel Function to Access


Glenda/All--

I brought your function into Access 2002, cleaned up the extraneous
characters, and tested it; it works fine. As it should; it's pure VBA,
and calls nothing that wouldn't be on any machine. Which is to say, it
should work for not just Access and Excel, but also Word, Project,
Visio, and any other application which uses VBA. Was your reason for
asking the question because it's *not* working in Access for you?

Anyway, just for kicks, here's the email validation function I use in
VBA; it makes use of the Regular Expression ActiveX object that's
present and available on any machine with IE 5.0 or newer:

Function IsEmailValid(sEmail) As Boolean
    Dim regEx As Object
    Dim retVal As Variant

    Set regEx = CreateObject("vbscript.regexp")
    regEx.Pattern =
"^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$"
    regEx.IgnoreCase = True
    retVal = regEx.Test(sEmail)
    If Not retVal Then
        IsEmailValid = False
    Else
        IsEmailValid = True
    End If
End Function

A little less verbose, wouldn't you say? Regular expressions are way too
cool...
 
--Jim

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: