Solved

Checking for Blank Lines

Posted on 1998-10-26
3
132 Views
Last Modified: 2010-04-30
I'm scanning through a text file line by line, and need to determine whether or not the current line is blank or not.  The problem is that these lines have a varying number of blank spaces.  I assume I need to check for an absence of numeric or alphabetic characters...
0
Comment
Question by:IsleOfView
3 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 20 total points
ID: 1441625
Try this:

IF LEN( TRIM( Text$ ) ) < 1 THEN (is blank)


0
 
LVL 2

Expert Comment

by:BergJC
ID: 1441626
You could do something like this:

For x = 1 to Len(FileString)
     If Mid$(FileString, x, 1) <> " " then
          StringIsNotBlank = True
     End-if
next
0
 

Author Comment

by:IsleOfView
ID: 1441627
Perfect!  Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA to copy paste columns form one file to other 20 85
Sending a email via excel using vba 6 71
VBA filters 2 50
TT Auto Dashboard 13 82
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now