Solved

Variable Editing...

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

820 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