Hallo Kauz,
Super, das funktionier soweit schon gut.
Jetzt bekomme ich von meinem Chef (nachträglich) die Anforderung, den Barcode in Text umzuwandeln.
Nun bin ich etwas buff, da ja eigentlich beim Barcode eine Zahl hochzählt!
Kann man das in diesem Code überhaupt ummünzen?
Momentan holt er sich ja den Wert aus dem TB Configuration "D22".
Wenn ich da aber einen Text eingebe, habe ich sofort einen Laufzeitfehler
Public Function getGreatestNumber() As Double
getGreatestNumber = CDbl(Worksheets("Configuration").Cells(22, 4).Text)
End Function
Gibts da ne Möglichkeit, das in Text zu ändern, ohne Counter?
Das soll dann ein statischer Wert sein der in allen Zellen gleich bleibt.
Ist das machbar?
Ich habe deinen Code noch mal angepasst
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
und das fett gedruckte rausgenommen.
Zudem passen die 3 Zellen nebeneinander mit den neuen Maßen (s. TB Configuration"F11-F18") nicht auf ein DINA4 Blatt.
Geht da evtl. noch was?
Vielen Dank schon mal für die Anpassung
Benjamin