Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

Download:

Datei 1: Demo_Barcode39.zip

Access, Excel Barcode Control

 

Barcode39 Control In Ms Access

 

In Microsoft Ms Access, ActiveX Control is inserted directly into a form.

Subsequently, the barcode control can convert a text into a barcode39 via vba code.

 

In the vba code, the control axBarcode39 is activated in Extras-> References

 

Afterwards I can directly address it in the vba code.

With create_Barcode39 (text) the barcode will be displayed directly

 

 

Code-Besipiel in MS Access vba macro

Option Compare Database

Option Explicit On

 

Private Sub btnStart_Click()

    '--------< btnStart_Click() >--------

    Dim objBarcode As axBarcode39.ComControl

    Set objBarcode = ctlBarcode.Object

   

    '--< Barcode anzeigen >--

    objBarcode.create_Barcode39(tbxEncode.Value)

    '--</ Barcode anzeigen >--

 

    '--------</ btnStart_Click() >--------

End Sub

 

 

 

 

Barcode39 in MS Excel

 

The barcode control is best generated dynamically by the macro code in Excel.

In the process, pure bitmaps are inserted as graphics in the Excel file, whereby the Excel document can be saved and forwarded without a macro.

 

In Excel, the barcode control can use the buffer to create fast bitmaps, so that no ActiveX Control has to be transferred to the file

With the method create_Barcode39_to_Clipboard the barcode39 is placed directly in the clipboard

Dim objBarcode As New axBarcode39.ComControl

objBarcode.create_Barcode39_to_Clipboard sEncode, 20

 

 

Excel then inserts the image with Pastespecial

Range(target_cell).PasteSpecial

 

 

Complete vba macro code for Excel as an example

Option Explicit On

 

Sub btnTest()

    create_Barcode39 "B4", "D4"

    create_Barcode39 "B5", "D5"

    create_Barcode39 "B6", "D6"

    create_Barcode39 "B7", "D7"

End Sub

 

 

Public Function create_Barcode39(ByVal encode_Cell As String, ByVal target_cell As String)

 

    '--------< btnStart_Click() >--------

    Dim sEncode As String

    sEncode = Range(encode_Cell)

 

    '-< create barCode >

    Dim objBarcode As New axBarcode39.ComControl

    objBarcode.create_Barcode39_to_Clipboard sEncode, 20

    '-</ create barCode >

 

 

 

    '< insert as bitmap >

    Range(target_cell).PasteSpecial

    '</ insert as bitmap >

    '--------</ btnStart_Click() >--------

End Function

 

 

 

 

 

 

 

Mobile

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de