Professional Documents
Culture Documents
Untitled
Untitled
Untitled
End If
End Sub
-----------------------------------------------------------------------------------
--------
Sub WriteData_3()
Worksheets("Sheet1").Range("A1").Select
Range("A1").CurrentRegion.Select 'A1 ���� ����� �ִ� �ֺ� �� ��� ����
MsgBox Selection.Address & "����� �����Ͽ���ϴ�. ��� ��� �ڽϴ�"
Selection.ClearContents
With Range("A1,A3,A5,A7,A9,B2,B4,B6,B8,B10")
.Select
.Value = "Test"
End With
MsgBox """A1,A3,A5,A7,A9,B2,B4,B6,B8,B10""���� ��� �Է��Ͽ���ϴ�"
End Sub
-----------------------------------------------------------------------------------
--------
! Range ����Ʈ�� �̹
� ���õǾ� �ִ� ���¿��� ����� �� ��ü�� �Ǵ� �� ��ü�� Ȯ���ϴ� ���
Sub Rows_Property_3()
Range("B2:E3").Select
MsgBox "���õ� ����� �� ��ü�� Ȯ��", ,"jkkim@th-net.co.kr"
Selection.EntireRow.Select
MsgBox "���� ����� �� ��ü�� Ȯ�� �Ǿ��ϴ�"
Range("B2:E3").Select
MsgBox "���õ� ����� �� ��ü�� Ȯ��"
Selection.EntireColumn.Select
MsgBox "���� ����� �� ��ü�� Ȯ�� �Ǿ��ϴ�"
End Sub
-----------------------------------------------------------------------------------
--------
Sub CurrentRegion_Property_3()
Range("A1").CurrentRegion.Select
MsgBox "���� ����� �����Ͽ���ϴ�"
Selection.Offset(1,0).Select
MsgBox "���� ���� �߿��� Ÿ��Ʋ �κ�� ����Ͽ���ϴ�"
Selection.Resize(Selection.Rows.Cout- 1, Selection.Columns.Count).Select
MsgBox "��� ��ĥ� �մϴ�"
Selection.Interior.ColorIndex = 44
End Sub
-----------------------------------------------------------------------------------
--------
<Type �μ�>
<Value �μ�>
- xlErrors : ������
- xlLogical : ����
- xlNumbers : ��� �ڰ
- xlTextValues : ������ڿ
Sub SpecialCells_Method()
ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Select
MsgBox "���� ������ �� �ּҴ�" &Selection.Address & "�̰
� &vbCr & "�Էµ� ���"
&Selection.Value & "�Դϴ�"
End Sub
Sub SpecialCells_Method_2()
rngMyRange.Interior.ColorIndex = 6 '����
MsgBox "����� �Էµ� ��� ��� ������� ǥ���Ͽ���ϴ�!"
End Sub
-----------------------------------------------------------------------------------
--------
<��������>
- Range("D8").End(xlUp).Select : D8 �� ������� ���� �ִ� ��� �
- Range("D8").End(xlDown).Select : D8 �� ������� ���� �ִ� ��� �Ʒ�
- Range("D8").End(xlToLeft).Select : D8 �� ������� ���� �ִ� ��� ����
- Range("D8").End(xlToRight).Select : D8 �� ������� ���� �ִ� ��� �����
Sub End_Property()
With rngStart.End(xlUp).Select
strAddress = Selection.Address(rowabsolute:=False,columnabsolut:=False)
MsgBox "D8 ���� ��� �� ���� [" & strAddress & "]��� �����Ͽ���ϴ�"
End With
End Sub
Sub End_Property_2()
Range(Range("A3"), Range("A3").End(xlToRight)).Select
Selection.Interior.ColorIndex = 6
Selection.Font.ColorIndex = 2
MsgBox "A3�� ���� ������ �ִ� ����� �������� ���� ���� �Ϸ�"
End Sub