Page Up/Page Down 버튼으로 시트를 이동합니다.
Dim i As Integer
Dim setTime As Double
Sub Auto_Open()
Application.OnKey "{PGDN}", "DN"
Application.OnKey "{PGUP}", "UP"
End Sub
Sub DN()
If setTime > Timer Then Exit Sub
i = ActiveSheet.Index
i = i - 1
If i < 1 Then i = 1
Sheets(i).Activate
setTime = Timer + 1 / 3
End Sub
Sub UP()
If setTime > Timer Then Exit Sub
i = ActiveSheet.Index
i = i + 1
If i > Sheets.Count Then i = Sheets.Count
Sheets(i).Activate
setTime = Timer + 1 / 3
End Sub
'Excel & vba' 카테고리의 다른 글
[vba] ListObjects(QueryTable)를 이용한 엑셀 열지않고 데이터 가지고옴 (0) | 2016.01.07 |
---|
이 포스팅은 쿠팡 파트너스 활동으로, 일정액의 커미션을 제공받고 있습니다.