Solved

Instr problem

Posted on 2002-04-18
9
200 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
  • 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

772 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