A
Angi
I'm trying to parse a number out of a size field. The data in the
field is ## x ## x ##. There could be different lengths of numbers, so
I'm trying to use the Mid with the Instr method.
Here's my code:
Me.txtText = Mid(cboSize.Column(2), InStr(1, cboSize.Column(2), "x", 1)
+ 2, InStr(InStr(1, cboSize.Column(2), "x", 1), cboSize.Column(2), "x",
1) - 2)
The weird thing is if the field is
60 x 40 x 24 the result is 40 (correct)
20 x 0.5 x 63 the result is 0. (incorrect)
Why is it acting like it's using a specific numbers of spaces instead
of looking for the 2nd x??
TIA!
field is ## x ## x ##. There could be different lengths of numbers, so
I'm trying to use the Mid with the Instr method.
Here's my code:
Me.txtText = Mid(cboSize.Column(2), InStr(1, cboSize.Column(2), "x", 1)
+ 2, InStr(InStr(1, cboSize.Column(2), "x", 1), cboSize.Column(2), "x",
1) - 2)
The weird thing is if the field is
60 x 40 x 24 the result is 40 (correct)
20 x 0.5 x 63 the result is 0. (incorrect)
Why is it acting like it's using a specific numbers of spaces instead
of looking for the 2nd x??
TIA!