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

[µo°Ý] «ç¼Ë±NDATA (Sheet 2)ªº¼Æ¾Ú·h¥hINVOICE(Sheet 1)«á³v­¶¦C¦L

[µo°Ý] «ç¼Ë±NDATA (Sheet 2)ªº¼Æ¾Ú·h¥hINVOICE(Sheet 1)«á³v­¶¦C¦L

¦U¦ì¤j¤j,
¤p§Ì¤S¦³°ÝÃD½Ð±ÐÅo;P
«ç¼Ë±NDATA (Sheet 2)ªº¼Æ¾Ú·h¥hINVOICE(Sheet 1)«á³v­¶¦C¦L ???
·P¿E:P

Invoice.rar (5.43 KB)

HERO

¦^´_ 3# Hero2013

¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsieh ¤j¤j,

ÁÂÁ§Aªº¦^ÂÐ, ¤£¹L¦ü¥G¥X²{Error.

µM«á¤p§Ì´N¦Û¤v¹Á¸Õ¼g, ¤£¦p¥u¦L¤F4±i, ¤£ª¾¬°Ô£©O:'(

§ä¤F«Ü¤[¤]§ä¤£¥X­ì¦]...............

Sub INV()

Dim i As Integer, R As Integer
Set my_invoice = Worksheets("INVOICE")
Set my_data = Worksheets("PRINT")

With Worksheets("PRINT")
        .Activate
        R = .Cells(Rows.Count, 1).End(xlUp).Row
End With
   
i = 3

Do While i <= R
  my_invoice.Cells(10, 3) = my_data.Cells(i, 11)
  my_invoice.Cells(16, 5) = my_data.Cells(i, 13)
  my_invoice.Cells(18, 2) = my_data.Cells(i, 19)
  my_invoice.Cells(19, 4) = my_data.Cells(i, 2)
  my_invoice.Cells(20, 4) = my_data.Cells(i, 15)
  my_invoice.Cells(21, 4) = my_data.Cells(i, 16)
  my_invoice.Cells(22, 4) = my_data.Cells(i, 17)
  my_invoice.Cells(23, 4) = my_data.Cells(i, 18)
  my_invoice.PrintOut
  
  i = i + 1
Loop

End Sub

Invoice_Revised.rar (12.53 KB)

HERO

TOP

¦^´_ 1# Hero2013
  1. Sub PrintData()
  2. With ¤u§@ªí2
  3.    ar = .Range("A1").CurrentRegion
  4.    r = 3
  5.    Do Until r > UBound(ar, 1)
  6.       With ¤u§@ªí1
  7.       .[B8] = ar(r, 11)
  8.       .[C13] = ar(r, 13)
  9.       .[B15:B18] = Application.Transpose(Array(ar(r, 2), ar(r, 15), ar(r, 16), ar(r, 17)))
  10.      ' .PrintOut '¦C¦L
  11.       .PrintPreview '¹wÄý¦C¦L
  12.       End With
  13.       r = r + 1
  14.     Loop
  15. End With
  16. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

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