hellfire45
Active Member
- Joined
- Jun 7, 2014
- Messages
- 464
So I'm not even sure what the best way to describe this is but...
I have a string value in Excel. In the excel sheet it reads as "4502575223". If I click at the end of this string and type backspace, the cursor will not move. If I press it again, it deletes the 3 off the end. It takes 2 backspaces because there is an invisible "?" both before AND after the string.
How do I know there are invisible "?"? Well in VBA, in the locals window, i see this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Expression[/TD]
[TD]Value[/TD]
[TD]Type[/TD]
[/TR]
[TR]
[TD]Current_ship_po[/TD]
[TD]"?4502575223?"[/TD]
[TD]String[/TD]
[/TR]
[TR]
[TD]Current_ship_line[/TD]
[TD]"100.1[/TD]
[TD]String[/TD]
[/TR]
</tbody>[/TABLE]
if I do the following code, the result is false:
FALSE
FALSE
FALSE
I need to get rid of the "?" on both sides of the string but I can't even get the machine to recognize it's there. Anybody seen this before? How do I code through this mess? Thanks guys!
I have a string value in Excel. In the excel sheet it reads as "4502575223". If I click at the end of this string and type backspace, the cursor will not move. If I press it again, it deletes the 3 off the end. It takes 2 backspaces because there is an invisible "?" both before AND after the string.
How do I know there are invisible "?"? Well in VBA, in the locals window, i see this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Expression[/TD]
[TD]Value[/TD]
[TD]Type[/TD]
[/TR]
[TR]
[TD]Current_ship_po[/TD]
[TD]"?4502575223?"[/TD]
[TD]String[/TD]
[/TR]
[TR]
[TD]Current_ship_line[/TD]
[TD]"100.1[/TD]
[TD]String[/TD]
[/TR]
</tbody>[/TABLE]
if I do the following code, the result is false:
Code:
If Left(current_ship_po, 1) = "?" Then current_ship_po = Right(current_ship_po, Len(current_ship_po) - 1)
Code:
If Left(current_ship_po, 1) = "" Then current_ship_po = Right(current_ship_po, Len(current_ship_po) - 1)
Code:
If Left(current_ship_po, 1) = " " Then current_ship_po = Right(current_ship_po, Len(current_ship_po) - 1)
I need to get rid of the "?" on both sides of the string but I can't even get the machine to recognize it's there. Anybody seen this before? How do I code through this mess? Thanks guys!