Solved

Variable Editing...

Posted on 1998-09-18
3
134 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
[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
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bit defender blocks good applications 2 115
Spell Check in VB6 13 144
Modify Text File with Excel Macro 13 42
Userform to show a range in excel. 3 28
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

738 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