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

[µo°Ý] ªì¾Ç¤£¤~¡A½Ð°Ý³o¦p¦ó²¤Æ?

[µo°Ý] ªì¾Ç¤£¤~¡A½Ð°Ý³o¦p¦ó²¤Æ?

¦U¦ì¦Ñ®v¦n:

¥H¤U¬O§Ú¸óÀɮר̫ü©wÀx¦s®æ­È¦Ó¨úªº¥t¤@ÀÉ®×Àx¦s®æ­È©Ò¼g¡A¦ý¬O.........§Ú­n±qF4......G4......H4.....¤@ª½°µ¨ìZ4¡ARANGE()ªºÅܰʤ£·|¼g¡A¥u¯à¤@ª½COPY°µ.....:'(

ÁٽЦѮv«ü¾É....·PÁÂ!

Public Sub test()
Range("f4:f9") = "='D:\Desktop\a\[" & [F2] & ".xlsm]b'!" & [$d4] & ""
Range("f10:f14") = "='D:\Desktop\a\[" & [F2] & ".xlsm]b'!" &  [$d10] & ""
Range("f15:f20") = "='D:\Desktop\a\[" & [F2] & ".xlsm]b'!" &  [$d15] & ""
Range("g4:g9") = "='D:\Desktop\a\[" & [G2] & ".xlsm]b'!" & [$d4] & ""
Range("g10:g14") = "='D:\Desktop\a\[" & [G2] & ".xlsm]b'!" & [$d10] & ""
Range("g15:g20") = "='D:\Desktop\a\[" & [G2] & ".xlsm]b'!" & [$d15] & ""

end sub

¦^´_ 6# ML089


    ÁÂÁª©¤j¡A¸Ñ¨M¤F...·PÁ«ü¾É!!

TOP

¦^´_ 5# dakiu

¥i¥H¨Ï¥Î ThisWorkbook.Path ¨Ó´À¥N

ThisWorkbook.Path  ¬°µ{¦¡Àɮתº¥Ø¿ý¦ì¸m
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 2# ML089


    ª©¤j¡A¯à§_¦A½Ð±Ð?
1)¸ê®Æ³£©ñ¦b¦P¤@¸ê®Æ§¨¡A¦pªG¦¹¸ê®Æ§¨²¾°Ê«á¡A³o  'D:\Desktop\a\  ¯à§_¦Û°ÊÅܧó¦ì¸m?

¦A¦¸¨D±Ð¡A·PÁÂ!

TOP

ÁÂÁÂ2¦ì«ü¾É¡A·|¦b²Ó¤ß¬ã¨s¾Ç²ß¤F!·PÁÂ

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2016-6-1 22:04 ½s¿è

¦^´_ 1# dakiu
¤]¥i¥H¼g³o¼Ë :
  1. Public Sub test()
  2.   Dim iI%, iC%, iR%, vR()
  3.   
  4.   iC = 6
  5.   vR = Array(4, 10, 15, 21)
  6.   While iC <= 26
  7.     For iI = 0 To 2
  8.       iR = vR(iI)
  9.       Range(Cells(iR, iC), Cells(vR(iI + 1) - 1, iC)) = _
  10.           "'D:\Desktop\a\[" & Cells(2, iC) & ".xlsm]b'!" & Cells(iR, 4) & ""
  11.     Next
  12.     iC = iC + 1
  13.   Wend
  14. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# dakiu

Public Sub test2()
    For Each xR In [F1:Z1]
        Range(xR(4), xR(9)) = "='D:\Desktop\a\[" & xR(2) & ".xlsm]b'!" & [$d4] & ""
        Range(xR(10), xR(14)) = "='D:\Desktop\a\[" & xR(2) & ".xlsm]b'!" & [$d10] & ""
        Range(xR(15), xR(20)) = "='D:\Desktop\a\[" & xR(2) & ".xlsm]b'!" & [$d15] & ""
    Next
End Sub
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

        ÀR«ä¦Û¦b : µÊ®ð¼L¤Ú¤£¦n¡A¤ß¦a¦A¦n¤]¤£¯àºâ¬O¦n¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD