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

½Æ»s½d³ò¥i³s¦PÄæ¼e©Î¦C°ª½Æ»s¶Ü?

½Æ»s½d³ò¥i³s¦PÄæ¼e©Î¦C°ª½Æ»s¶Ü?

½Ð°Ý¦bCopy Range ®É, ¥i¥H³s¦PÄæ¼e©Î¦C°ª½Æ»s¶Ü?
½Ð«ü±Ð

½Ð°Ý¦bCopy Range ®É, ¥i¥H³s¦PÄæ¼e©Î¦C°ª½Æ»s¶Ü?
½Ð«ü±Ð
enoch µoªí©ó 2016-4-24 19:08

¥i¥H¾aµ{¦¡¨Ó¹F¦¨ :
  1. Sub nn()
  2.   Dim lJ&, lSrc&, lTrc&, lrcs&
  3.   Dim rSou As Range, rTar As Range
  4.   
  5.   Set rSou = [A2:E13]' ¨Ó·½
  6.   Set rTar = [G16] ' ¥Øªº
  7.   
  8.   rSou.Copy rTar ' «þ¨©
  9.   
  10. '===== ³vÄæ½Æ»sÄæ¼e===
  11.   lSrc = rSou(1).Column
  12.   lTrc = rTar(1).Column
  13.   lrcs = rSou.Columns.Count - 1
  14.   For lJ = 0 To lrcs
  15.     Columns(lTrc + lJ).ColumnWidth = Columns(lSrc + lJ).ColumnWidth
  16.   Next
  17.   
  18. '===== ³v¦C½Æ»s¦C°ª===
  19.   lSrc = rSou(1).Row
  20.   lTrc = rTar(1).Row
  21.   lrcs = rSou.Rows.Count - 1
  22.   For lJ = 0 To lrcs
  23.     Rows(lTrc + lJ).RowHeight = Rows(lSrc + lJ).RowHeight
  24.   Next
  25. End Sub
½Æ»s¥N½X

TOP

¥i¥H¾aµ{¦¡¨Ó¹F¦¨ :
luhpro µoªí©ó 2016-4-27 22:42

¥Ø¦aªº ¦b¤£¦Pªº¤u§@ªí¦n¹³µL®Ä???

TOP

Äæ¼e¤Î®æ¦¡½Æ»s¥i¥H¨Ï¥Î "¿ï¾Ü©Ê¶K¤W"¡A¤Ä¿ïÄæ¼e¤Î®æ¦¡
¥i¥H¿ý»s¥¨¶°¦p¤U

Sub ½Æ»s§tÄæ¼e¤Î®æ¦¡()
    Dim rSou As Range, rTar As Range
    Set rSou = Sheets("Sheet8").Range("A1:D17")
    Set rTar = Sheets("sheet2").Range("G6")
    rSou.Copy rTar
    With rTar
        rSou.Copy
        .PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
                      SkipBlanks:=False, Transpose:=False
        .PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
                      SkipBlanks:=False, Transpose:=False
    End With
End Sub
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

        ÀR«ä¦Û¦b : ¤â¤ß¦V¤U¬O§U¤H¡A¤â¤ß¦V¤W¬O¨D¤H¡F§U¤H§Ö¼Ö¡A¨D¤Hµh­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD