dimanche 30 septembre 2018

Try to Use Boolean Logic to Evaluate an If Statement in VBA

I have to say, VBA might just be the most illogical programming language I encountered. So many conventions defied and it's aggravating me. I'm trying to run some code if this logic applies:

If Left(Source.Range("B" & i).Value, 46) <> _
       "There is no Burger of the Day in this episode." Or _
       Left(Source.Range("B" & i).Value) <> "" Then

I was looking at examples online and it seemed people simply used "Or" but I'm getting errors when trying to run this. I even put parentheses around both evaluations and it still didn't help. Help is much appreciated!

Aucun commentaire:

Enregistrer un commentaire