A way for less lines employs the new _IIF keyword Plus some strategic rearrangement:
Code: (Select All)
Const Conv# = 25.4 '25.4 mm every inch
Dim op% 'which operation (either in to mm or mm to in
Dim num As Double ' a number to convert
Input "Enter a Number to convert "; num
Input "Enter Either 1 for conversion to mm from inches or 2 vice versa "; op%
If op% = 1 Or op% = 2 Then Print _IIf(op% = 1, num * Conv#, num / Conv#)
b = b + ...