There's probably a better way of doing what I'm trying to do. I need to send data to a server when the value changes. However, I don't want to send it while it's scrolling because I don't want to send 100 requests to the server if I scroll from 1 to 100, so I only send it when they click up with the mouse (if changed hoping triggered when the up/down arrow was pressed) or when they press enter. So I do the following. If you have a better idea, I'd love to hear it.
Dim blnFlowRateChanged As Boolean
Private Sub txtFlowRate_KeyPress(KeyAscii As Integer)
If blnFlowRateChanged Then
If KeyAscii = 13 or KeyAscii = 10 Then
SendData "FlowRate=" & txtFlowRate.Text
blnFlowRateChanged = False
End If
End If
End Sub
Private Sub txtFlowRate_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If blnFlowRateChanged Then
SendData "FlowRate=" & txtFlowRate.Text
blnFlowRateChanged = False
End If
End Sub
Private Sub txtFlowRate_ValueChanged(Value As Variant, PreviousValue As Variant, ByVal OutOfRange As Boolean)
blnFlowRateChanged = True
End Sub