?
Solved

string

Posted on 1998-07-04
5
Medium Priority
?
122 Views
Last Modified: 2010-05-03
If I have stringA and stringB, I want to search
stringA To see if it contains  stringB and if so remove
stringB and all Characters to the right within  stringA.
Joe
0
Comment
Question by:josmic
[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
  • 3
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
cymbolic earned 150 total points
ID: 1464934
dim i as integer

'assuming you have stringA and stringB already defined:

i=instr(stringA,stringB)
if i> 0 then stringA=left$stringA,i-1)

'thats all!
0
 
LVL 9

Expert Comment

by:cymbolic
ID: 1464935
that's left$(stringA,i-1)  minor typo!
0
 
LVL 9

Expert Comment

by:cymbolic
ID: 1464936
that's left$(stringA,i-1)  minor typo!
0
 

Author Comment

by:josmic
ID: 1464937
thank you
why do I see left and sometimes left$, whats the diff.
0
 

Author Comment

by:josmic
ID: 1464938
guess your gone, thanks
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

771 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