"vMike" <Mi************@5nerrawgenospam.comwrote in message
news:QL******************@bignews7.bellsouth.net.. .
>
"patrickdrd" <pa********@discussions.microsoft.comwrote in message
news:B1**********************************@microsof t.com...
"free demo" once more...
is there any free control to do it or I should have to pay?
It really is not that hard to create. It is simply a set of lines for each
number from 0 to 9 (ten images) which can be used to barcode any number.
You
need to calculate the check digit too.
I created some fonts for codebar and upc. I will be happy to email them to
you. You can then use them to make images. Codabar does not use a check
digit. For UPC then check digit calculation is easy. Here is some VBA code
to calc upc checkdigit.
Function GenerateCheckDigit(strBaseBarCode As String) As Integer
Dim intLength As Integer
Dim intEvenSum As Integer
Dim intOddSum As Integer
Dim i As Integer
GenerateCheckDigit = -1
On Error GoTo Errorhandler
intEvenSum = 0
intOddSum = 0
intLength = Len(strBaseBarCode)
For i = 1 To intLength
If i Mod 2 = 0 Then
intEvenSum = intEvenSum + CInt(Mid(strBaseBarCode, i, 1))
Else
intOddSum = intOddSum + CInt(Mid(strBaseBarCode, i, 1))
End If
Next i
GenerateCheckDigit = Right(CStr(1000 - (intEvenSum + intOddSum * 3)), 1)
Exit Function
Errorhandler:
MsgBox "Generate check digit function failed."
GenerateCheckDigit = -1
End Function
>