In VBA, you need to compare two variables, one of which is requested via the user form, and the second is taken from the Excel table. As a result, it turns out that a numeric variable comes from Excel, and a text string comes from (for some reason). As a result of the comparison, it always turns out that the text is greater than numeric, which is wrong.
How to make so that from the user form came numerical value?
val()? - VladDscontaining a number. To get this very number, get a new variablevand assign it the value ofVal(s). Now this number (v) can be compared with others. - VladD