Solved

instr

Posted on 1998-10-07
3
363 Views
Last Modified: 2010-04-30
are there any problems in writing var1=instr(temp,".")-1
where temp is b.0, and var1 is a string. will var1 get the value 1 or 0. what happends if there is no "." in temp?
what will be the value of mid$(temp,1,instr(temp,".")-1) , is it b. thank you.
0
Comment
Question by:ilanm
[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
 

Author Comment

by:ilanm
ID: 1438686
Edited text of question
0
 
LVL 3

Accepted Solution

by:
vmano earned 30 total points
ID: 1438687
the instr syntax is:
instr( start, string1, string2, compare)
string1 is your temp
string2 is the required string.

and more to follow...
0
 
LVL 3

Expert Comment

by:vmano
ID: 1438688
if you do var1 = instr(1,temp, ".") -1, var1 will return 1
and if there is no "." in temp, var1 will return -1
and if you do  var1 = Mid$(temp, 1, (InStr(1, temp, ".") - 1)), var1 will return "b"

0

Featured Post

Independent Software Vendors: 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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

730 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