Geoff
08-18-2014, 09:38 AM
If I want to check a string variable for lack of content, I usually use:
If Trim($var) = vbNullString...
(There is probably a better way to do it, but I have used this in so many places .....)
I have now hit a problem with some strings that have to be of fixed length and trimming doesn't change that. So:
dim $var as String * 25
If Trim($var) = vbNullString ...
will always return "False" because if it doesn't contain anything else, $var will contain 25 spaces.
Is there any way to check for this state other than comparing it to a string of 25 spaces?
TIA
Geoff
If Trim($var) = vbNullString...
(There is probably a better way to do it, but I have used this in so many places .....)
I have now hit a problem with some strings that have to be of fixed length and trimming doesn't change that. So:
dim $var as String * 25
If Trim($var) = vbNullString ...
will always return "False" because if it doesn't contain anything else, $var will contain 25 spaces.
Is there any way to check for this state other than comparing it to a string of 25 spaces?
TIA
Geoff