D
dominik lenné
Hi.
Office 2000. Excel VBA.
The following "if" structure didn't work:
If InStr(Zeile, ":") And Not InStr(Zeile, "h:") Then '
statement
End If
"Not work" means, that "statement" was executed if there was ":" present, regardless of wether "h:" was present in the line or not.
The following workaround worked:
boolHColon = False
If InStr(strZeile, "h:") Then
hcolon = True
End If
If InStr(strZeile, ":") And Not boolHColon Then '
statement
End If
Seemingly, the InStr() is not evaluated correctly in the "if" conditions. Is that true? Or what else?
regards
Dominik Lenné
Office 2000. Excel VBA.
The following "if" structure didn't work:
If InStr(Zeile, ":") And Not InStr(Zeile, "h:") Then '
statement
End If
"Not work" means, that "statement" was executed if there was ":" present, regardless of wether "h:" was present in the line or not.
The following workaround worked:
boolHColon = False
If InStr(strZeile, "h:") Then
hcolon = True
End If
If InStr(strZeile, ":") And Not boolHColon Then '
statement
End If
Seemingly, the InStr() is not evaluated correctly in the "if" conditions. Is that true? Or what else?
regards
Dominik Lenné