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

[µo°Ý] ¦p¦ó¥u½Æ»s¤@­Ó©w¸q¦WºÙ¤ºªº®Ø½u®æ¦¡(¨Ò¦p¥u¥]§tlinestyle,colorindex,weight)?

[µo°Ý] ¦p¦ó¥u½Æ»s¤@­Ó©w¸q¦WºÙ¤ºªº®Ø½u®æ¦¡(¨Ò¦p¥u¥]§tlinestyle,colorindex,weight)?

¦U¦ì°ª¤â¤j¤j,
¦pÃD,
¦b¤@­Ósheet¤º¦³¦hµ§¬Û¦P½d³òªº©w¸q¦WºÙ¡A¥ý·|¦b²Ä¤@­Ó©w¸q¦WºÙ¤ºµe¦n®Ø½u¡A¥Ø¼Ð¬O±Nµe¦nªº®Ø½u®æ¦¡½Æ»sµ¹¨ä¥L©w¸q¦WºÙ¡C
°_ªì·Q¥Î¤â°Êpasteformat¦ýµo²{·|§â©³¦â¸ê®Æ¶K¤W¥h¡AµLªk¥uµe®Ø½u¡C«á¨Ó·j´M¸ê®Æµo²{¥H¤U»yªk¥i¥Î
ActiveCell.Offset(0, 5).Borders().LineStyle = ActiveCell.Borders().LineStyle
©Ò¥Hµy·L°µ­Ó¹êÅç§ïÅܦp¤U, c4:D5¬O¦³µe®Ø½uªº¡A­n±N¨ä®Ø½u®æ¦¡½Æ»sµ¹¨Sµe®Ø½uªºa1:b2 ¡A
ActiveSheet.Range("a1:B2").Borders().LineStyle = ActiveSheet.Range("c4:D5").Borders().LineStyle
µ²ªG«oµLªk°õ¦æ!!!! ¤£ª¾°ÝÃD¥X¦b­þ¸Ì?

½Ð°Ý¦U¦ì°ª¤â¤j¤j¡A¬O§_ÁÙ¦³¨ä¥L¤è¦¡¥i¥H¥u½Æ»s®Ø½u®æ¦¡¡AµM«á¶Kµ¹¬Û¦P¤j¤p½d³òªºrange??

¦^´_ 2# Hsieh

·PÁ¶W¯Åª©¥DªºÀ°¦£...
ªGµM¬O»Ý­n±½´y¨C­Ócellªº®Ø½u¤~¦³¿ìªk§¹¥þ½Æ»s¡AÁöµM»Ýªá¦h¤@ÂI®É¶¡¦ý°ÝÃD¸Ñ¨M¤F¡AÆgÆgÆg°Õ.....
®M¥Î®Éµo²{¤@­Ó¤p°ÝÃD¡A¦pªG±NweightÂ\¦b³Ì«á¤@¶µ(¦]¿ý»smacro®Éweight³£Â\¦b³Ì«á)·|¦h¥X¤£¥²­nªº½u¦pªþ¹Ï,
¦ý¥u­n¤£­nÂ\¦b³Ì«á¤@¶µ´N¨S°ÝÃD¡A¤£ª¾¬°¤°»ò?
¦pªG¶W¯Åª©¥D¦³®É¶¡ªº¸Ü¡A¦AÀ°¦£µªÂФ@¤U¡A¦A¦¸·PÁÂÅo~~~

Sub nn()
Dim Rng As Range, Rng1 As Range
Set Rng = Range("C4:D5") '¨Ó·½½d³ò
Set Rng1 = Range("A1:B2") '§ïÅܽd³ò
Rng1.ClearFormats
For i = 1 To Rng.Rows.Count
   For j = 1 To Rng.Columns.Count
     For k = 1 To Rng.Borders.Count
       'Rng1(i, j).Borders(k).Weight = Rng(i, j).Borders(k).Weight
       Rng1(i, j).Borders(k).ColorIndex = Rng(i, j).Borders(k).ColorIndex
       Rng1(i, j).Borders(k).LineStyle = Rng(i, j).Borders(k).LineStyle
       Rng1(i, j).Borders(k).Weight = Rng(i, j).Borders(k).Weight
     Next
   Next
Next
End Sub

   

TOP

¦^´_ 1# swatt
­n¨C±ø®æ½u³v¤@³]©w
  1. Sub nn()
  2. Dim Rng As Range, Rng1 As Range
  3. Set Rng = Range("C4:D5") '¨Ó·½½d³ò
  4. Set Rng1 = Range("A1:B2") '§ïÅܽd³ò
  5. Rng1.ClearFormats
  6. For i = 1 To Rng.Rows.Count
  7.    For j = 1 To Rng.Columns.Count
  8.      For k = 1 To Rng.Borders.Count
  9.        Rng1(i, j).Borders(k).Weight = Rng(i, j).Borders(k).Weight
  10.        Rng1(i, j).Borders(k).ColorIndex = Rng(i, j).Borders(k).ColorIndex
  11.        Rng1(i, j).Borders(k).LineStyle = Rng(i, j).Borders(k).LineStyle
  12.      Next
  13.    Next
  14. Next
  15. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD