Comparing a piece of text to a number?

Please help me I followed "The Coding Bus" channel's codes but mine has an error, what should I do?

You should use InMetricType2 if weight is in Kgs and height is in centimeter and also change in first condition from not equal to if label1.text < 18.5 in second condition and label1.text from less than 25 to less or equal 25 and in third condition from greater than 25 to greater or equal 25. Finally you should change in the beginning set Label1.FontSize to Label1.Text


That particular error message says that you are comparing the word "BMI" (not a number) to a number.

Don't do that.

@abg error is caused I believe because font size changes when button click and not text so most probaly label text is originally set to BMI and does not change. Since op followed a specific tutorial I also noticed some differences between the tutorial and the code above