| ©«¤l605 ¥DÃD92 ºëµØ0 ¿n¤À648 ÂI¦W0  §@·~¨t²Îwindows ³nÅ骩¥»7 ¾\ŪÅv50 ©Ê§O¨k ¨Ó¦Ûmacau µù¥U®É¶¡2013-4-5 ³Ì«áµn¿ý2019-2-10 
  
 | 
                
| ¦^´_ 7# hank10459 
 here is the code.
 ½Æ»s¥N½XPrivate Sub Worksheet_Activate()
With Sheets(2)
    blnk = .[R4] <> "" Or .[R5] <> "" Or .[R6] <> "" _
        Or .[S5] <> "" Or .[S6] <> "" _
        Or .[T5] <> "" Or .[T6] <> ""
End With
If blnk Then
        Range("R4:T6").Select
    With Selection
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With
    With Selection.Borders(xlDiagonalDown)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlDiagonalUp)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Else
    Range("O4:Q6").Select
    ActiveWindow.SmallScroll Down:=-6
    Selection.Copy
    Range("R4").Select
    Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
    Range("F4:H6").Select
    Selection.Copy
    Range("U4:W6").Select
    Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
End If
End Sub
 | 
 |