반응형
Excel VBA로 현재 위치를 알아내는 코드입니다.
활성화된 Cell 위치나 영역설정시의 위치 및 영역에서의 row,column 개수를 알아낼 수 있습니다.
Function position()
'현재 활성화된 Cell 위치
Debug.Print ActiveCell.Row
Debug.Print ActiveCell.Column
'현재 지정된 영역의 Cell 위치
Debug.Print Selection.Cells.Row
Debug.Print Selection.Cells.Column
'현재 지정된 영역의 가로세로 개수
Debug.Print Selection.Cells.Rows.Count
Debug.Print Selection.Cells.Columns.Count
End Function
반응형
'Office' 카테고리의 다른 글
[Excel] Registry 읽고 쓰고 삭제하기 (0) | 2023.05.02 |
---|---|
[Excel] AutoCAD Text 추출 (0) | 2023.05.02 |
[Excel]엑셀 연결 끊기가 안될때 해결방법 (0) | 2023.05.02 |
[Excel] UART HEX 통신 VBA Serial 통신 (0) | 2023.05.02 |
[Excel] vba 마지막행 마지막열 찾기 (0) | 2023.04.14 |