¥µ¥¤¥é¥¹¤ÎËÜê
2006-06-20
[Excel] ·ÓÀþ¤Î°ú¤Êý
Excel VBA ¤Ç·ÓÀþ¤ò°ú¤¯¾ì¹ç¡¢ÈϰϤȤʤë Range ¤Î Borders ¥×¥í¥Ñ¥Æ¥£¤Ë¤ª¤¤¤Æ°Ê²¼¤Î¤è¤¦¤ËÀßÄꤷ¤Þ¤¹¡£¤Ê¤ª¡¢·ÓÀþ¤ÎÂÀ¤µ(Weight)¤Ï¡¢XlBorderWeight ¥¯¥é¥¹¤ÎÄê¿ô¡ÊxlHairline¡¢xlThin¡¢xlMedium¡¢xlThick¡Ë¤ò»ÈÍѤ·¤Þ¤¹¡£With Sheet1.Range(Sheet1.Cells(1, 1), Sheet1.Cells(MaxRow, MaxCol)) .Borders.LineStyle = xlContinuous '---·ÓÀþ¤Î¼ïÎà .Borders.Weight = xlThin '---·ÓÀþ¤ÎÂÀ¤µ .Borders.Color = RGB(0, 0, 0) '---RGBÃͤǿ§¤ò»ØÄê .Font.Name = "£Í£Ó £ÐÌÀÄ«" '---¥Õ¥©¥ó¥ÈÀßÄê End With