michaelehoudek
New Member
- Joined
- Jan 15, 2016
- Messages
- 21
I have the game scoring worksheet pictured below. Everything works fine up to 6 players. If I add another, the line "If Range("H" & rownum) <> Range("J11").Value Then" doesn't work as it should and triggers Exit Sub. I added the MsgBox line above to verify H and row matchs J11, which it always does. Can't firgure out why it works till J11 is 0.0007 or higher! Any ideas? Thanks, Mike
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rownum As Integer, CellValue As String, Game As String, MyInput As Integer, Selected
On Error GoTo ErrorHandler
'Sheets("Results").Protect UserInterfaceOnly:=True
Game = Sheets("Input").Range("Game")
rownum = ActiveCell.Row
Selected = ("$L" & "$" & (25 - MyInput))
numselect = Range("$A$1").Value
If Game = "Chickenfoot" Then
If (ActiveCell.Row) = numselect Then
Exit Sub
Else
MsgBox (Range("H" & rownum).Value & " " & Range("J11").Value) 'THIS LINE NORMALLY ISN'T HERE, JUST DONE TO CONFIRM VALUES ARE THE SAME
If Range("H" & rownum) <> Range("J11").Value Then
Exit Sub
End If
MyInput = InputBox("Domino number selection", "Enter Number Entering Score For, or Press Enter if on right row")
ActiveSheet.Range("$A$1") = 25 - MyInput
If (ActiveCell.Address) = Selected Then
Application.EnableEvents = True
Exit Sub
Attachments
Last edited: