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

[µo°Ý] ½Ð°Ý¦³µL¯«¤H¥iÀ°¸Ñ¨M³o®æ¦¡¤Æ±ø¥óªº°ÝÃD

¦^´_ 7# hank10459

here is the code.
  1. Private Sub Worksheet_Activate()

  2. With Sheets(2)
  3.     blnk = .[R4] <> "" Or .[R5] <> "" Or .[R6] <> "" _
  4.         Or .[S5] <> "" Or .[S6] <> "" _
  5.         Or .[T5] <> "" Or .[T6] <> ""
  6. End With


  7. If blnk Then
  8.         Range("R4:T6").Select
  9.     With Selection
  10.         .WrapText = False
  11.         .Orientation = 0
  12.         .AddIndent = False
  13.         .ShrinkToFit = False
  14.         .ReadingOrder = xlContext
  15.         .MergeCells = True
  16.     End With
  17.     With Selection.Borders(xlDiagonalDown)
  18.         .LineStyle = xlContinuous
  19.         .ColorIndex = xlAutomatic
  20.         .TintAndShade = 0
  21.         .Weight = xlMedium
  22.     End With
  23.     With Selection.Borders(xlDiagonalUp)
  24.         .LineStyle = xlContinuous
  25.         .ColorIndex = xlAutomatic
  26.         .TintAndShade = 0
  27.         .Weight = xlMedium
  28.     End With
  29.     With Selection.Borders(xlEdgeLeft)
  30.         .LineStyle = xlContinuous
  31.         .ColorIndex = xlAutomatic
  32.         .TintAndShade = 0
  33.         .Weight = xlMedium
  34.     End With
  35.     With Selection.Borders(xlEdgeTop)
  36.         .LineStyle = xlContinuous
  37.         .ColorIndex = xlAutomatic
  38.         .TintAndShade = 0
  39.         .Weight = xlMedium
  40.     End With
  41.     With Selection.Borders(xlEdgeBottom)
  42.         .LineStyle = xlContinuous
  43.         .ColorIndex = xlAutomatic
  44.         .TintAndShade = 0
  45.         .Weight = xlMedium
  46.     End With
  47.     With Selection.Borders(xlEdgeRight)
  48.         .LineStyle = xlContinuous
  49.         .ColorIndex = xlAutomatic
  50.         .TintAndShade = 0
  51.         .Weight = xlMedium
  52.     End With
  53.     Selection.Borders(xlInsideVertical).LineStyle = xlNone
  54.     Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
  55. Else
  56.     Range("O4:Q6").Select
  57.     ActiveWindow.SmallScroll Down:=-6
  58.     Selection.Copy
  59.     Range("R4").Select
  60.     Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
  61.         SkipBlanks:=False, Transpose:=False
  62.     Application.CutCopyMode = False
  63.     Range("F4:H6").Select
  64.     Selection.Copy
  65.     Range("U4:W6").Select
  66.     Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
  67.         SkipBlanks:=False, Transpose:=False
  68.     Application.CutCopyMode = False

  69. End If


  70. End Sub
½Æ»s¥N½X
ss

TOP

¥»©«³Ì«á¥Ñ hank10459 ©ó 2014-3-5 11:31 ½s¿è

¦^´_ 6# sunnyso
S¤j¡A±z¦n§Ú¦³¬Ý¨ì±zªº¦^ÂСA¦ý¦]¬°§ÚLEVEL¤£°÷...¥i§_E-MAILµ¹§Ú©O¡C§Úªº«H½c¬O[email protected]    ÁÂÁÂS¤j

TOP

Sonny.gif Q1-Sonny.rar (20.9 KB) ¦^´_ 5# hank10459
ss

TOP

¦^´_ 4# sunnyso
¦^¯«¤HS, §Ú¤w¸g¤W²î¹Ïªí^^³Â·Ð±zÅo Q1.rar (16.84 KB)

TOP

¦^´_ 1# hank10459

¤W­Óªþ¥ó, ±a¦³§A¤½¦¡µ¥. §Ú¨Ó¸Ñ¨MXªº°ÝÃD
ss

TOP

¦^´_ 2# seer_et
±z¦nS¤j¡A¥Ø«e§Úªº®æ¬O¤]¨S¿ìªk¥Î¨ì¨ººØX¹Ï¥Ü»¡!½Ð°Ý¦³¿ìªk¥i¥Hµ¹¥L¥´¤W¤j¤e¤e¶Ü?

TOP

¦^´_ 1# hank10459

¨â­Ó¤èªk¥i¯à°µ¨ì§A­nªº:

1.¨Ï¥Î¦WºÙ

2.¨Ï¥Îindirect¨Ó³B²z§A­n®æ¦¡¤Æªº±ø¥ó°Ñ·Ó¡C

½Ð°Ñ¦Ò³o¸Ì:
http://tw.knowledge.yahoo.com/question/question?qid=1512071307819

TOP

        ÀR«ä¦Û¦b : ¦¨¥\¬OÀuÂIªºµo´§¡A¥¢±Ñ¬O¯ÊÂIªº²Ö¿n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD