As the title explains a result from an input box is behaving strangely. It seems like when there is a consecutive double up in last integers in data coming from the balance in the second sub below, what ends up in the cell after the return is not the same as appears on the screen of the balance.
so: 2.56 on the balance screen gives 2.56 in the cell but 2.55 on the screen gives 2.50 ?
or: 2.565 on the balance screen gives 2.565 in the cell but 2.855 on the screen gives 2.850 ? Any ideas would be great. Thanks.
This is the code.
Private Sub Barcode_Keydown(ByVal KeyCode As MSForms.ReturnInteger, _
                            ByVal Shift As Integer)    
    Worksheets("Data").Activate    
    ActiveSheet.Unprotect "waterypanda"
    If KeyCode = vbKeyReturn Then    
        ActiveCell = Barcode.Value    
        ActiveCell.Offset(0, 1).Select    
        ActiveCell.Value = ""    
        If Len(Me.Barcode.Value) = 8 Then Me.weight.SetFocus    
    End If
    Worksheets("Data").Activate  
    ActiveSheet.Protect "waterypanda"    
End Sub
Private Sub weight_Keydown(ByVal KeyCode As MSForms.ReturnInteger, _
                            ByVal Shift As Integer)
    Worksheets("Data").Activate    
    ActiveSheet.Unprotect "waterypanda"
    If KeyCode = vbKeyReturn Then    
        ActiveCell = weight.Value    
        Barcode.Value = ""    
        weight.Value = ""    
        ActiveCell.Offset(1, -1).Select    
    End If
    Worksheets("Data").Activate   
    ActiveSheet.Protect "waterypanda"    
End Sub
 
    