ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð±ÐVBA»s³yBar Code

½Ð±ÐVBA»s³yBar Code


½Ð±ÐVBA»s³yBar Code¡G
¦bData ªí内 ®Ú¾Ú ÄæB ¦Ü Äæ H ¡]¼È©wH, ¥i¯à·|§ó¦hÄæ¼Æ¡^ªº¸ê®Æ¡A¨C¦æ»s³y¤@­Ó°ß¤@ªº¤Gºû½X¡A¦p¥ªÃäÄæA¡C
·í±½´y¥ªÃäÄæAªº¤Gºû½X¦Z¡A·|Åã¥Ü¹Ï¤ù¥kÃä¬õ¦âªº¸ê®Æ¡C

BARCODE.rar (18.84 KB)

½Ð±ÐVBA»s³yBar Code¡G
¦bData ªí内 ®Ú¾Ú ÄæB ¦Ü Äæ H ¡]¼È©wH, ¥i¯à·|§ó¦hÄæ¼Æ¡^ªº¸ê®Æ¡A¨C¦æ»s³y ...
198188 µoªí©ó 2024-6-13 15:26



Ū¨ú³æ¤@Àx¦s®æ¸ê®ÆÀ´±o¦p¦ó¾Þ§@¡A¦pªG¤£·Q±N¦h­ÓÀx¦s®æªº¸ê®Æ¡A¦X¦}¦b¤@­ÓÀx¦s®æ内¡C
¬O§_¥i¥H¦P®ÉŪ¨ú¦h­ÓÀx¦s®æ¸ê®Æ¡H

TOP

½Ð±ÐVBA»s³yBar Code¡G
¦bData ªí内 ®Ú¾Ú ÄæB ¦Ü Äæ H ¡]¼È©wH, ¥i¯à·|§ó¦hÄæ¼Æ¡^ªº¸ê®Æ¡A¨C¦æ»s³y ...
198188 µoªí©ó 2024-6-13 15:26


¤À¨Éªì¨Bµ²ªG
  1. Sub Make_BarCode()
  2. Dim i, j As Integer
  3. With Worksheets("Data")
  4. j = Range("C1").End(xlDown).Row
  5. For i = 2 To j
  6. Range("A" & i).Select
  7. filepath = "https://api.qrserver.com/v1/create-qr-code/?size=95x95&data=" & Range("C1").Value & ":" & Range("C" & i).Value & vbLf & Range("D1").Value & ":" & Range("D" & i).Value & vbLf & Range("E1").Value & ":" & Range("E" & i).Value & vbLf & Range("F1").Value & ":" & Range("F" & i).Value & vbLf & Range("G1").Value & ":" & Range("G" & i).Value & vbLf & Range("H1").Value & ":" & Range("H" & i).Value & vbLf & Range("I1").Value & ":" & Range("I" & i).Value & vbLf & Range("J1").Value & ":" & Range("J" & i).Value & vbLf & Range("K1").Value & ":" & Range("K" & i).Value & vbLf & Range("L1").Value & ":" & Range("L" & i).Value & vbLf & Range("M1").Value & ":" & Range("M" & i).Value
  8. With ActiveSheet.Pictures.Insert(filepath)

  9.             H1 = .TopLeftCell.Height
  10.             H2 = .Height
  11.             .Top = .TopLeftCell.Top + (H1 - H2) / 2
  12.             H1 = .TopLeftCell.Width
  13.             H2 = .Width
  14.             .Left = .TopLeftCell.Left + (H1 - H2) / 2
  15.         End With
  16.    

  17. Range("B" & i) = "*" & Range("C" & i) & "*"
  18. Range("B" & i).Font.Name = "Bar-Code 39"
  19. Range("B" & i).Font.Size = "25"

  20. Next i
  21. End With
  22. End Sub


  23. Sub Remove_QR_Code()
  24. Dim i, j As Integer

  25. With Worksheets("Data")
  26. For Each pic In ActiveSheet.Pictures
  27. pic.Delete
  28. Next pic

  29. j = Range("B1").End(xlDown).Row

  30. For i = 2 To j
  31. Range("B" & i) = ""
  32. Range("B" & i).Font.Name = "Calibri"
  33. Next i
  34. End With

  35. End Sub
½Æ»s¥N½X

BarCodeTest.rar (29.22 KB)

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¨S¦³©Ò¦³Åv¡A¥u¦³¥Í©Rªº¨Ï¥ÎÅv¡C
ªð¦^¦Cªí ¤W¤@¥DÃD