Solved

Checking for Blank Lines

Posted on 1998-10-26
3
138 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

717 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