Solved

Checking for Blank Lines

Posted on 1998-10-26
3
135 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

777 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