![]() |
Using And with two InStr calls - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Using And with two InStr calls (/showthread.php?tid=3637) |
Using And with two InStr calls - CMR - 04-25-2025 Anybody know how to make this work? Maybe a 'Not InStr Xor InStr'? My problem is InStr doesn't return true or false, but the position of the substring inside the string. Maybe I need to rethink the whole structure. I want to be able to default to -sh (run CreateSheet) if no option is given. Code: (Select All)
RE: Using And with two InStr calls - Petr - 04-25-2025 Try add > 0 if instr.... > 0 and instr... > 0 then... RE: Using And with two InStr calls - SMcNeill - 04-25-2025 _AndAlso for logic decisions and not binary comparisons. If instr... _AndAlso instr.... then RE: Using And with two InStr calls - CMR - 04-25-2025 Thank you both. I knew the answer was probably simple. |