July 22, 2000

Self-aware Data Wrapper Objects with VB

f you’re one of the thousands of programmers out there writing server-side business components, then youve probably used data wrappers: light-weight objects designed to access streamed data. The following article

MSExcel – A class for writing Excel spreadsheets

‘***********************************************************’* Module Name: MSExcel’* Author: Steve Miller’* Date: 11/22/98’* Description: Encapsulates and eases the chore of writing to an Excel ‘ spreadsheet.’*’* IMPORTANT: requires that you have a reference to

The beginning or end of previous week

For reporting, many times you need to figure out what date last week began and ended. Use the code below to figure that out: Dim vntBegin As variantDim vntEnd As

Send HTML Email via CDO

Ever wonder how to send email that looks like a web page? Here is how you do it. Note: You must have CDO for NT referenced for this to work.

Sending Email Using CDO and MAPI

Sending emails via code used to be cool, but now it is a necessity. Below is code to send email via CDO. If the CDO call fails, it will send

IsValidDateField – Check whether a date is valid

Enum psDateTypes AnyValidDate ‘Allows any valid date to be entered PastDate ‘Only allows past dates (before today) to be entered FutureDate ‘Only allows future dates (after today) to be entered

IsValidSSN – Check a Social Security Number value

‘ Validates attributes of the SSN’ Returns True if valid, False if invalid”Example:’ If IsValidSSN(Value:=”333-44-3333″, IsRequired:=True) then …Function IsValidSSN(ByRef Value As String, Optional ByVal IsRequired As Boolean _ = True)

IsValidPhoneField – Check whether a phone number is valid

‘ Validate attributes of Phone data’ Returns True if valid, False if invalid” Also returns the phone in formatted fashion (USA format).’ Will convert alphabetics to numeric”Example:’ If IsValidPhoneField(Value:=”3034414444″, ReformattedPhone:=strNewPhone,’