Thread: [Solved] Need help creating vba code
View Single Post
 
Old 10-28-2019, 02:41 PM
Moot70 Moot70 is offline Windows 10 Office 2019
Novice
 
Join Date: Oct 2019
Location: Oklahoma
Posts: 16
Moot70 is on a distinguished road
Default

Code:
Private Sub Worksheet_Change(ByVal Target As Range) Dim tabArray As Variant
Dim i As Long
tabArray = Array("B3", "F3", "B4", "F4", "B5", "F5", "B6", "F6", "B7", "F7", "B8", "F8", "B9", "F9", "B10", "F10",

"B11", "F11", "B12", "F12", "B13", "F13", "B14", "F14", "B15", "F15", "B16", "F16", "B17", "F17", "B18", "F18")
Application.ScreenUpdating = False
For i = LBound(tabArray) To UBound(tabArray)
If tabArray(i) = Target.Address(0, 0) Then
If i = UBound(tabArray) Then
Me.Range(tabArray(LBound(tabArray))).Select
Else
Me.Range(tabArray(i + 1)).Select
End If
End If
Next i
Application.ScreenUpdating = True
End Sub
Where I put this code at?


TY
Moot70

Last edited by Moot70; 10-29-2019 at 01:38 AM.
Reply With Quote