Solved

Variable Editing...

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…

773 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