Numeric values are being entered into a textbox on a userform. I need to check that they are in increments of five. I am trying to use the BeforeUpdate event for the textbox to call a subroutine that will check the value and round up if necessary. The textbox is tbHIVRNA.
Private Sub tbHIVRNA_Change()
NewVal = Val(tbHIVRNA.Text)
If NewVal >= sbHIVRNA.Min And _
NewVal <= sbHIVRNA.Max Then _
sbHIVRNA.Value = NewVal
Call Check_Format(tbHIVRNA)
' Call Round_Up_To_Five(tbHIVRNA)
End Sub
Private Sub tbHIVRNA_BeforeUpdate(ByValTrue As MSForms.ReturnBoolean)
Call Round_Up_To_Five(tbHIVRNA)
End Sub
This generates a compile error "Procedure Declaration Does Not Match Description of Event or Procedure Having the Same Name". Isn't tbHIVRNA_BeforeUpdate a valid event?
Private Sub tbHIVRNA_Change()
NewVal = Val(tbHIVRNA.Text)
If NewVal >= sbHIVRNA.Min And _
NewVal <= sbHIVRNA.Max Then _
sbHIVRNA.Value = NewVal
Call Check_Format(tbHIVRNA)
' Call Round_Up_To_Five(tbHIVRNA)
End Sub
Private Sub tbHIVRNA_BeforeUpdate(ByValTrue As MSForms.ReturnBoolean)
Call Round_Up_To_Five(tbHIVRNA)
End Sub
This generates a compile error "Procedure Declaration Does Not Match Description of Event or Procedure Having the Same Name". Isn't tbHIVRNA_BeforeUpdate a valid event?