Hi All
I am trying to write a VBA macro for use in Reflections for UNIX.
Here is the code:
It looks like it should work fine, but it doesnt.
I have confirmed that the .GetText parts work and does in fact create strings of the selected text based on the cursors position.
I think it breaks down in the IF statement, no matter what I do it always returns "N", even with all the conditions for "Q" are met. I have even tried to remove the Duty > 0 part, leaving just COM = COO. But it still returns "N".
I'm guessing it doesn't match the inputed value (COO) with what it reads in COM even when they should be identical?
Any help would be greatly appreciated.
I am trying to write a VBA macro for use in Reflections for UNIX.
Here is the code:
Code:
Dim COO As String
COO = InputBox("Origin that is duty free")
Dim COM As String
Dim Duty As String
COM = .GetText(CursorRow, CursorColumn - 5, CursorRow, CursorColumn - 3)
Duty = .GetText(CursorRow, CursorColumn + 2, CursorRow, CursorColumn + 4)
If COM = COO And Duty > 0 Then
.Transmit "Q"
Else
.Transmit "N"
End If
I have confirmed that the .GetText parts work and does in fact create strings of the selected text based on the cursors position.
I think it breaks down in the IF statement, no matter what I do it always returns "N", even with all the conditions for "Q" are met. I have even tried to remove the Duty > 0 part, leaving just COM = COO. But it still returns "N".
I'm guessing it doesn't match the inputed value (COO) with what it reads in COM even when they should be identical?
Any help would be greatly appreciated.