Sub fillPageWithBarcodes(page As Integer, startBarcodeValue As Double, count As Integer)
Dim col As Integer, row As Integer
If Not (count = 0) Then
fillPageWithBarcodes page - 1, startBarcodeValue - 1, count - 1
row = (((count - 1) \ 3) + 1) * 2
col = ((count - 1) Mod 3) + 1
'##### ORGINALCODE############
' Worksheets("Barcodes").Cells(row - 1, col).Value = Format_Code128(getContainerCode(Trim(Str(startBarcodeValue))))
' Worksheets("Barcodes").Cells(row, col).Value = "SID: " + getContainerCode(Trim(Str(startBarcodeValue)))
'##### ------------- Alles in Eine Zelle --------------------------
Worksheets("Barcodes").Cells(row - 1, col).Value = Format_Code128(getContainerCode(Trim(Str(startBarcodeValue)))) & Chr(13) & "SID: " + getContainerCode(Trim(Str(startBarcodeValue)))
End If
End Sub
Sub setBarcodeCells(pages As Integer, heightFirst As Integer, heightSecond As Integer, clearTextHeightFirst As Integer, clearTextHeightSecond As Integer)
Dim row As Integer
If Not pages = 0 Then
setBarcodeCells pages - 1, heightFirst, heightSecond, clearTextHeightFirst, clearTextHeightSecond
If (pages Mod 3) = 1 Then
row = (pages \ 3 + 1) * 2 ' oder wie oben (ist egal) row = (((pages - 1) \ 4) + 1) * 2
Worksheets("Barcodes").Rows(row - 1).Font.Name = "Code-128-DH"
'###------------ Schriftgröße 1.Zeile der Zelle --------------------------------------
Worksheets("Barcodes").Rows(row - 1).Characters(Start:=1, Length:=13).Font.Size = 22
'###------------ Schriftgröße 2.Zeile der Zelle -----------------------------
Worksheets("Barcodes").Rows(row - 1).Characters(Start:=14, Length:=16).Font.Size = 18
'###------------- Zeilenumbruch setzen ----------------------------------------
Worksheets("Barcodes").Rows(row - 1).WrapText = True
Worksheets("Barcodes").Rows(row - 1).VerticalAlignment = xlVAlignTop
Worksheets("Barcodes").Rows(row - 1).RowHeight = heightFirst
'Worksheets("Barcodes").Rows(row - 1).Font.Size = 22
'###-------------- Die zweite Zeile ausblenden -------------------------------
Worksheets("Barcodes").Rows(row).Hidden = True
'##### ORGINALCODE############
' Worksheets("Barcodes").Rows(row).Font.Name = "Arial"
' Worksheets("Barcodes").Rows(row).VerticalAlignment = xlVAlignTop
' Worksheets("Barcodes").Rows(row).RowHeight = clearTextHeightFirst
'Worksheets("Barcodes").Rows(row).Font.Size = 12
End If
End If
End Sub
Folgende Einstellungen hab ich benutzt:Public Function getGreatestNumber() As Double
getGreatestNumber = CDbl(Worksheets("Configuration").Cells(22, 4).Text)
End Function
Private Sub UserForm_Activate()
Txtbox_startAt.Text = Str(getGreatestNumber)
Txtbox_count.Text = Str(getStandardCount)
End Sub
' Txtbox_startAt.Text = Str(getGreatestNumber)
' Txtbox_count.Text = Str(getStandardCount)
Txtbox_startAt.Text = getGreatestNumber
Txtbox_count.Text = getStandardCountPublic Sub replaceBarcodeSheet()
Application.DisplayAlerts = False
Worksheets("Barcodes").Delete
Set sheet = Worksheets.Add
sheet.Name = "Barcodes"
Application.DisplayAlerts = True
End Sub
Hilfe für nicht funktionierendes Skype und Mac OSX 10.5 Leopard
ake 05.11.2007 - 1823 Hits -
Hilfe
Andreas_Hoffmann 09.04.2009 - 208 Hits - 3 Antworten
Erstellen einer Monats-Liste auf einem neuen Sheet Monat_XY
laun 15.06.2009 - 163 Hits - 2 Antworten
VBA für Barcode
BenjaminM 17.12.2009 - 383 Hits - 17 Antworten