|
一応これで希望の内容は実現できると思いますが
あまりスマートではないですね。
もしイメージと違うようなら入力方法もお教えいただけると
他の方から根本的な解決が得られるかもしれませんよ。
Option Explicit
Public R As Long
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
With Target
If .Row <> R And R <> 0 Then
Cells(R, .Column).Select
Else
R = .Row
End If
End With
ActiveWindow.ScrollRow = 1
If R > 15 Then
ActiveWindow.SmallScroll Down:=R - 15
End If
R = 0
MsgBox "a"
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim tmp As Long
With Target
tmp = .Row
If tmp = 45 Then
R = 58
ElseIf tmp = 58 And Cells(46, .Column).Value = "" Then
R = 47
ElseIf tmp = 57 Then
R = 46
ElseIf tmp = 46 Then
R = 59
End If
End With
End Sub
|
|