Solved

Position of "/"...

Posted on 2000-03-16
4
232 Views
Last Modified: 2010-05-02
Code:

Dim sText as String
Dim iPos as Integer

sText = "www.vb.com/support/developers/vb/stringfunctions"

which line of code will assign the position of the last slash(/) to the variable iPos ?

1)iPos = Instr(1,sText,"/",vbCompareReverse)
2)iPos = Instr(-1,sText, "/")
3)iPos = InstrRev(sText, "/")
4)iPos = RevInstr(-1,sText,"/")


Which is true option out of  4 ?

Thanks,
bhavesh
0
Comment
Question by:bhavesh55
[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
4 Comments
 
LVL 20

Expert Comment

by:hes
ID: 2625316
3
0
 

Author Comment

by:bhavesh55
ID: 2625351
Thanks
0
 
LVL 20

Accepted Solution

by:
hes earned 5 total points
ID: 2625415
see above
0
 
LVL 21

Expert Comment

by:tfewster
ID: 2637730
I think you missed a bit, hes:

 .
 .
Dim bhavesh55 as A_15W_Light_Bulb
 .
 .
iPos = Bottom_Of_Class(F-,bhavesh55,"!")
 .
 .
0

Featured Post

Technology Partners: 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 trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month4 days, 17 hours left to enroll

636 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