Solved

Instr problem

Posted on 2002-04-18
9
211 Views
Last Modified: 2012-05-04

Hi Guys

I always had problem with instr


dim mystring as string
mystring="aa bb"

I want to get the in two separate variables aa and bb
basically anything from the start to the space and
anything from the space to the end

dim variableAA as string
variableAA=instr(????)
variableBB=instr(???)

can you help
Thanks
Gabriel
0
Comment
Question by:Gabriel_Brienza
[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
  • 5
  • 4
9 Comments
 

Expert Comment

by:WizOfOz
ID: 6950994
Why not use split?
variableAA=split (mystring," ")(0)
variableBB=split (mystring," ")(0)
0
 

Expert Comment

by:WizOfOz
ID: 6950997
ops, xcuse me
variableBB=split (mystring," ")(1)
0
 

Author Comment

by:Gabriel_Brienza
ID: 6951018
Hi there
it says script outof range
Any Ideas
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Accepted Solution

by:
WizOfOz earned 10 total points
ID: 6951020
variableAA=split(mystring, " ")(0)
variableBB=split(mystring, " ")(1)

try this

0
 

Author Comment

by:Gabriel_Brienza
ID: 6951021
Another thing,
Variable aa and variablebb can be of any length!
Thanks
Gabriel
0
 

Expert Comment

by:WizOfOz
ID: 6951022
xcuse my last post
0
 

Author Comment

by:Gabriel_Brienza
ID: 6951035
It works!!
Thanks
Gabriele
0
 

Author Comment

by:Gabriel_Brienza
ID: 6951145
Actually it didnt work
Any further suggestions
Thanks
Gabriel
0
 

Author Comment

by:Gabriel_Brienza
ID: 6951164
sorry it works actually
APOLOGIES
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…
Suggested Courses
Course of the Month5 days, 23 hours left to enroll

626 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