Printing Codabar barcodes in Visual Basic

This sample code is provided as is and input error correction is your responsibility. Please report any bugs or problems.

'The Codabar character set includes the numbers 0-9, the characters: - + / $ : .
'with the characters "A", "B", "C", and "D" used as the start and stop bars.

Function AzaleaCodabarA(ByVal yourString as String) as String
' Codabar v6.0 Copyright 2008 Jerry Whiting. All rights reserved.
' Azalea Software, Inc.  www.azalea.com
' This function creates Codabar bar codes using "A" for the start and stop bars.
' Format the output, AzaleaCodabarA, using Azalea Software's Codabar font.
' yourContainer.text = AzaleaCodabarA(yourString)
  AzaleaCodabarA = "A" + yourString + "A"
End Function

Function AzaleaCodabarB(ByVal yourString as String) as String
' Codabar v6.0 Copyright 2008 Jerry Whiting. All rights reserved.
' Azalea Software, Inc.  www.azalea.com
' This function creates Codabar bar codes using "B" for the start and stop bars.
' Format the output, AzaleaCodabarB, using Azalea Software's Codabar font.
' yourContainer.text = AzaleaCodabarB(yourString)
  AzaleaCodabarB = "B" + yourString + "B"
End Function

Function AzaleaCodabarC(ByVal yourString as String) as String
' Codabar v6.0 Copyright 2008 Jerry Whiting. All rights reserved.
' Azalea Software, Inc.  www.azalea.com
' This function creates Codabar bar codes using "C" for the start and stop bars.
' Format the output, AzaleaCodabarC, using Azalea Software's Codabar font.
' yourContainer.text = AzaleaCodabarC(yourString)
  AzaleaCodabarC = "C" + yourString + "C"
End Function

Function AzaleaCodabarD(ByVal yourString as String) as String
' Codabar v6.0 Copyright 2008 Jerry Whiting. All rights reserved.
' Azalea Software, Inc.  www.azalea.com
' This function creates Codabar bar codes using "D" for the start and stop bars.
' Format the output, AzaleaCodabarD, using Azalea Software's Codabar font.
' yourContainer.text = AzaleaCodabarD(yourString)
  AzaleaCodabarD = "D" + yourString + "D"
End Function

Our Codabar Visual Basic function can be ported to other languages and development tools. You may copy, paste, and edit the code as you wish, but please remember that our copyright notice must remain intact. If you port it, please send us a copy so we can learn something new. AtDhVaAnNkCsE

As always, if you have any questions contact us via email at technicalsupport at azalea dot com