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

³]©w®æ¦¡¤Æ±ø¥ó-²Ê½u

³]©w®æ¦¡¤Æ±ø¥ó-²Ê½u

¥H¤U¬O¤p§Ìªºµ{¦¡¡G

Private Sub CommandButton1_Click()

   Range("C2:AG3").Select
    Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
        "=WEEKDAY(DATE($AM$1,$AN$1,COLUMN(A:A)),1)=2"
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1).Borders(xlLeft)
        .LineStyle = xlContinuous
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.FormatConditions(1).Borders(xlRight)
        .LineStyle = xlContinuous
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.FormatConditions(1).Borders(xlTop)
        .LineStyle = xlContinuous
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.FormatConditions(1).Borders(xlBottom)
        .LineStyle = xlContinuous
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.FormatConditions(1).Interior
        .PatternColorIndex = xlAutomatic
        .ThemeColor = xlThemeColorAccent6
        .TintAndShade = 0.799981688894314
    End With
    Selection.FormatConditions(1).StopIfTrue = False

End Sub

§@¥Î¨ä¬O¥u¬O¬°¤F­n­pºâ¬P´Á¤é¦Ó¤w¡A
¤£¹L°ÝÃD¦b©óÀx¦s®æªº³¡¥÷¡I

¤p§Ì¦³¥h¬dÀx¦s®æªº¼gªk¡A¦]¬°¤p§Ì§Æ±æ¥kÃ䨺±ø¬O¶Â¦â²ÊÃ䪺¡A
With Selection.FormatConditions(1).Borders(xlRight)
        .LineStyle = xlContinuous
        .TintAndShade = 0
        .Weight = xlThin
End With

©ó¬O¤p§Ì§â¤W­zªº
.Weight = xlMedium
¥¢±Ñ¡I

©ÎªÌ§â
.Borders(xlRight)
§ï¦¨
.Borders(xlEdgeRight)
©³¤U¦A´«¦¨
.Weight = xlMedium
¤]¬O¥¢±Ñ¡I

½Ð°Ý¦³«e½ú¥i¥H«ü¾É¤@¤Uªº¶Ü¡HÁÂÁ¤j®a¡I

¥Øªº¬O§Æ±æÅܦ¨
¥Õ©³´N¦n¡A¥kÃ䪺½u¬O²Ê½u¡A
µM«á¥i¥H¦Û°Ê®M¤J®æ¦¡¤Æ¡A³o¼Ë¨C­Ó¤ë¤~·|¦Û¤v­pºâ¡C

¤W­zªº¬O¦³¤W¦â¡A¤£µM¤£ª¾¹D¦³¨S¦³§ï¦¨¥\¡A
µ¥¦¨¥\¤§«á¦A§âÃC¦â§ï¹L¡C

­è¤~¥h¬d¤F¤@¤U¡C


FormatConditions
ª«¥ó
ÄÝ©Ê
Font
²ÊÅé ¦â±m ColorIndex FontStyle ±×Åé §R°£½u ©³½u µLªk¨Ï¥Î·|­p©³½u¼Ë¦¡¡C
Border
¤U¤è ¦â±m ¥ª ±q¥k ¼Ë¦¡ ¥i¥H¨Ï¥Î¤U¦Cªº®Ø½u¼Ë¦¡ (©Ò¦³¨ä¥L¤H¤£¤ä´©)¡G xlNone¡B xlSolid¡B xlDash¡B xlDot¡B xlDashDot¡B xlDashDotDot¡B xlGray50¡B xlGray75¤ÎxlGray25¡C ³»ºÝÅv¼Æ ¥i¥H¨Ï¥Î¤U¦Cªº®Ø½u¼e«× (©Ò¦³¨ä¥L¤H¤£¤ä´©)¡G xlWeightHairline©MxlWeightThin¡C
Interior
Color ColorIndex Pattern PatternColorIndex

¦n¹³¨S¿ìªk.....
¦³¨ä¥L¤è¦¡¥i¥H¦Û°ÊÅܲʽu¶Ü¡HXD...
¦]¬°§Ú¬Ý¤W­±¬OHairline ©MThin ¦Ó¤w¡C

TOP

TOP

With Range("C2:AG3")
¡@¡@¡@.Columns(1).Borders.LineStyle = 1
¡@¡@¡@.Columns(1).Borders(xlEdgeRight).Weight = xlMedium
¡@¡@¡@.Columns(1).Copy
¡@¡@¡@.Cells.PasteSpecial xlPasteFormats
¡@¡@¡@.FormatConditions.Delete
¡@¡@¡@.FormatConditions.Add Type:=xlExpression, Formula1:= _
¡@¡@¡@¡@¡@¡@"=WEEKDAY(DATE($AM$1,$AN$1,COLUMN(A:A)),1)<>1"
¡@¡@¡@.FormatConditions(1).Borders(xlRight).Weight = xlThin
End With

¤Ï¨ä¹D¦Ó¦æ¡A¥þ³¡³]¬°¡e¥k²Ê½u¡f¡A
®æ¦¡¤Æ±ø¥ó¡A«D¡e©P¤é¡fªÌ¡A³]¡e¥k²Ó½u¡f¡ã¡ã

TOP

¤p§Ì«á­±·Q¨ì¤@­Ó¿ìªk¡A©³¤U¦A¥[¤@¦æ
=WEEKDAY(DATE($AM$1,$AN$1,COLUMN(A:A)),1)=2
ªº¼Æ¦r¡A´N·|¦³ 1.2.3....ªº¡A
µM«á¦pªG¬O1ªº¦A¥h§ó§ï¨º®æªºÀx¦s®æ¡A
¥ÎRange¥h¥]Cellsªº¡A¥hºâi¡A
Range(Cells(3,i),Cells(33,i))ªº¥hºâ¡A
¤j·§¬O³o¼Ë¡A¤W­±ªº¥i¯à¬O¿ù»~ªºcells®æ¼Æ¡A
¥u¬O§â¥t¥~¤@­Ó¬ã¨sªº¤èªk¼g¥X¨Ó¦Ó¤w¡A
·Ó¤W­±ªº°µªk¦³¦¨¥\­ò^^...
ÁÂÁª©¥D«ü±Ð¡I

TOP

¦^´_ 4# ­ã´£³¡ªL
¦n¤èªk, ÁÂÁ«ü±Ð¡I

TOP

        ÀR«ä¦Û¦b : ¬°¦Û¤v§äÂǤfªº¤H¥Ã»·¤£·|¶i¨B¡C
ªð¦^¦Cªí ¤W¤@¥DÃD