Solved

Variable Editing...

Posted on 1998-09-18
3
127 Views
Last Modified: 2010-04-30
I am working on an algorithm which would take a text file and load each line into a variable, and then adjust the line, store the finished variable in a new variable, then move on to the next line.  if I used the syntax:
if Left$(Ln$, 9)="some text" then Left$(Ln$, 9)=""

would this trunicate the first 9 characters of Ln$?
0
Comment
Question by:OIKster
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 total points
ID: 1435579
You should code it as:

IF LEFT$( Ln$, 9) = "some text" THEN Ln$ = RIGHT$( Ln$, len( Ln$ ) - 9 )

Since you want the result in Ln$ you have to have Ln$ be on the left side of the assignment operator (=).

M

0
 

Author Comment

by:OIKster
ID: 1435580
Thank you, You have been very helpful
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1435581
Glad to help!

M
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

747 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

12 Experts available now in Live!

Get 1:1 Help Now