- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 9# PD961A
¤W«hªºµ{¦¡½X,¬Onµ¹§A®M¥Î¨ìGet_BardCode ¤¤¥Îªº ,§AÀ³¸Ó¬ÝªºÀ´ þ¥u¬O³¡¤Àªºµ{¦¡½X.
§A¨S¦³µ¹µ{§Ç¦WºÙ
Sub ????()
'
'
End Sub
- Sub Get_BardCode()
- Dim A As Range, d As Object, r%, k%, cnt%, i%, pnt%
- Set d = CreateObject("Scripting.Dictionary")
- With Sheet2
- For Each A In .[A1:D1]
- d(A.Value) = InputBox("½Ð¿é¤J" & A & "¹w³]¦r¤¸", "¹w³]¦r¤¸", IIf(A = .[C1], "", IIf(A = .[A1], "CC", Mid(A, 1, 1))))
- Next
- ay = d.items
- For Each A In .Range(.[A2], .[A65536].End(xlUp))
- A.Offset(, 4) = InputBox("½Ð¿é¤J²Ä" & A.Row & "¦C" & A & "¤À¸Ë¶q", "¤À¸Ë¶q", 4)
- A.Offset(, 5) = IIf(A.Offset(, 1) Mod A.Offset(, 4) = 0, A.Offset(, 1) / A.Offset(, 4), Int(A.Offset(, 1) / A.Offset(, 4)) + 1)
- Next
- Sheet1.Range("B:C,F:G,J:K") = ""
- r = 2: k = 2
- kcnt = 1
- For Each A In .Range(.[A2], .[A65536].End(xlUp))
- AR = Array(A, A.Offset(, 4), A.Offset(, 2), A.Offset(, 3))
- cnt = 1
- Do Until cnt > A.Offset(, 5)
- If cnt = A.Offset(, 5) And A.Offset(, 1) Mod A.Offset(, 4) <> 0 Then
- AR(1) = A.Offset(, 1) - A.Offset(, 4) * (cnt - 1)
- End If
- Sheet1.Cells(r, k).Resize(4, 1).Value = Application.Transpose(AR)
- For i = 0 To UBound(AR)
- Sheet1.Cells(r + i, k + 1) = "*" & ay(i) & AR(i) & "*"
- Next
- r = IIf(r > 37, 2, IIf(k = 10, r + 5, r))
- k = IIf(r > 37 Or k = 10, 2, k + 4)
- If kcnt Mod 24 = 0 Or kcnt = Application.Sum(.Range(.[F2], .[F65536].End(xlUp))) Then
- If pnt <> 6 Then Sheet1.PrintPreview '¹wÄý
- If pnt = 0 Then pnt = MsgBox("¬O§_¦C¦L" & Chr(10) & "¬O ¦C¦L" & Chr(10) & "§_ ¹wÄý" & Chr(10) & "¨ú®ø Â÷¶}", vbYesNoCancel)
- If pnt = 2 Then Exit Sub
- If pnt = 6 Then Sheet1.PrintOut '¦C¦L
- If kcnt < Application.Sum(.Range(.[F2], .[F65536].End(xlUp))) Then Sheet1.Columns("B:C") = "": Sheet1.Columns("F:G") = "": Sheet1.Columns("J:K") = ""
- r = 2: k = 2
- End If
- kcnt = kcnt + 1
- cnt = cnt + 1
- Loop
- Next
- End With
- End Sub
½Æ»s¥N½X |
|