Condition to check if a string contains any data

Hello all,

I have a string as an output for a read cell.
I want to check if the read cell is blank or has been filled in
I tried to do String.Trim.Length <> 0 but I kept getting errors.

Any idea what kind of condition i can write to check IF string contains data or not?

1 Like

yourString.Trim = “”

1 Like

Can you check

  1. String.IsNullOrEmpty
  2. String.IsNullOrWhiteSpace
  3. varString is nothing
1 Like

you have to use

string.equals("") method to check string is empty

1 Like


Hope the following condition helps you

yourVariable isnot Nothing AndAlso not String.IsNullOrWhiteSpace(yourVariable.toString())


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.