Solved

Variable Editing...

Posted on 1998-09-18
3
129 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

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

932 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

18 Experts available now in Live!

Get 1:1 Help Now