THANKKKK YOUUUUUUUUUUUUUUUUUUUUUUUUU:yes:yes:yes:yes:yes:yes:yes:yes:yes:yes:yes:yes :yes
Printable View
THANKKKK YOUUUUUUUUUUUUUUUUUUUUUUUUU:yes:yes:yes:yes:yes:yes:yes:yes:yes:yes:yes:yes :yes
:rofl:
or:
Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("C3:Q17")) Is Nothing Then
Target.Interior.ColorIndex = 5
Application.Goto Target.Offset((UCase(Target) = "U") - (UCase(Target) = "D"), (UCase(Target) = "L") - (UCase(Target) = "R"))
End If
End Sub
@ JazzlikeSwan
False = 0, True = -1
Only one is true, or both are false-1 = up, --1 = down. (In first .Offset Parameter)Code:(UCase(Target) = "U") - (UCase(Target) = "D")
@ snb,
WOW, click anywhere in Maze and watch it solve, OK, it will be too fast to actually watch.
Better slow it down a bit
Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For i = 1 to 6000: Next
If Not Intersect(Target, Range("C3:Q17")) Is Nothing Then
Target.Interior.ColorIndex = 5
Application.Goto Target.Offset((UCase(Target) = "U") - (UCase(Target) = "D"), _
(UCase(Target) = "L") - (UCase(Target) = "R"))
End If
End Sub
or
Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("C3:Q17")) Is Nothing Then
Target.Interior.ColorIndex = 5
Application.Goto Target.Offset((UCase(Target) = "U") - (UCase(Target) = "D"), (UCase(Target) = "L") - (UCase(Target) = "R"))
application.wait 1
End If
End Sub
Revised
Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("C3:Q17")) Is Nothing Then
application.wait Now + 1 / 43200
Target.Interior.ColorIndex = 5
Application.Goto Target.Offset((UCase(Target) = "U") - (UCase(Target) = "D"), (UCase(Target) = "L") - (UCase(Target) = "R"))
End If
End Sub
Also revisedCode:Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For i = 1 to 4000: Next
If Not Intersect(Target, Range("C3:Q17")) Is Nothing Then
Target.Interior.ColorIndex = 5
Application.Goto Target.Offset((UCase(Target) = "U") - (UCase(Target) = "D"), _
(UCase(Target) = "L") - (UCase(Target) = "R"))
End If
End Sub
Much better :):think:
:devil2: