Dim bFLAG_KB,bFLAG_MB as boolean
If ComboBox2.SelectedItem = "KB/s" Then
NumericUpDown2.DecimalPlaces = 0
NumericUpDown2.Increment = 1
TranferRateSpeedKBs.Enabled = True
TranferRateSpeedMBs.Enabled = False
'My problem [I want to prevent the calculation if user has selected same option in combobox]
if NOT bFLAG_KB then
NumericUpDown2.Value = NumericUpDown2.Value * 1000
bFLAG_KB =true
End IF
ElseIf ComboBox2.SelectedItem = "MB/s" Then
NumericUpDown2.DecimalPlaces = 2
NumericUpDown2.Increment = 0.01
TranferRateSpeedKBs.Enabled = False
TranferRateSpeedMBs.Enabled = True
'My problem [I want to prevent the calculation if user has selected same option in combobox]
If NOT bFLAG_MB THEN
NumericUpDown2.Value = NumericUpDown2.Value / 1000
bFLAG_MB = True
END IF
End If