?
Solved

for cmix only

Posted on 1998-08-20
12
Medium Priority
?
117 Views
Last Modified: 2010-04-30
Her is your 50 for the VB question
0
Comment
Question by:MasseyM
[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
  • 7
  • 5
12 Comments
 
LVL 4

Accepted Solution

by:
mcix earned 320 total points
ID: 1430010
Thanks...

I will look into more code for you.
0
 
LVL 10

Author Comment

by:MasseyM
ID: 1430011
That is all I have right now...  I am going to use your code... I have manipulated it enough to fit what I wanted to.  If you want, the 200 is still open, add error checking and that stuff and you can have it...

For instance, what happens if they enter:
Mosiah 10      --> I have this one done
Mosiah         --> I have this one done
Mosiah10:3-5
Mosiah 10:4    --> I have this one done

Could they enter this?
Mosiah 10:3,7,9,...
How would I parse that?

Thanks for all your work!
0
 
LVL 4

Expert Comment

by:mcix
ID: 1430012
Are you familiar with String Tok?
0
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!

 
LVL 10

Author Comment

by:MasseyM
ID: 1430013
no... What is that?
0
 
LVL 4

Expert Comment

by:mcix
ID: 1430014
Here is some code that will put it in an array:


    Dim mstrQueryString As String
    Dim mstrBook As String
    Dim mstrChapter As String
    Dim mstrBeginVerse As String
    Dim mstrEndVerse As String
   
    Dim mintBookEnds As Integer
    Dim mintChapterEnds As Integer
    Dim mintStartVerseEnds As Integer
    Dim mintNumberOfChapters As Integer
    Dim mintCurrentVerse As Integer
    Dim mvarQueryStrings() As Variant
   
    mstrQueryString = "Mosiah 4:15-17"
    mintBookEnds = InStr(1, mstrQueryString, " ")
    mstrBook = Left(mstrQueryString, mintBookEnds - 1)
    mintChapterEnds = InStr(1, mstrQueryString, ":")
    mstrChapter = Trim$(Mid(mstrQueryString, mintBookEnds, mintChapterEnds - mintBookEnds))
   
    mintStartVerseEnds = InStr(1, mstrQueryString, "-")
   
    mstrBeginVerse = Trim$(Mid(mstrQueryString, mintChapterEnds + 1, mintStartVerseEnds - mintChapterEnds - 1))
    mstrEndVerse = Trim$(Mid(mstrQueryString, mintStartVerseEnds + 1))
    mintNumberOfChapters = Val(mstrEndVerse) - Val(mstrBeginVerse)
   
    ReDim mvarQueryStrings(mintNumberOfChapters, 2)
   
    For mintCurrentVerse = 0 To mintNumberOfChapters
        mvarQueryStrings(mintCurrentVerse, 0) = mstrBook
        mvarQueryStrings(mintCurrentVerse, 1) = mstrChapter
        mvarQueryStrings(mintCurrentVerse, 2) = Val(mstrBeginVerse) + mintCurrentVerse
    Next mintCurrentVerse


' I will get back to you on String Tok, in a bit
0
 
LVL 4

Expert Comment

by:mcix
ID: 1430015
By the way, do you have complete control over the HTML user interface?
0
 
LVL 10

Author Comment

by:MasseyM
ID: 1430016
Yes.. I have total control...  However, the string will come to me in an URL...

ldsmissions.net/scriptures/script.asp?Scripture=Mosiah 10:3-5
ldsmissions.net/scriptures/script.asp?Scripture=Mosiah 10
ldsmissions.net/scriptures/script.asp?Scripture=Mosiah

that will get me the verses...  That is why I need it parsed

0
 
LVL 4

Expert Comment

by:mcix
ID: 1430017
Did that code help?
0
 
LVL 10

Author Comment

by:MasseyM
ID: 1430018
The code to getthe scripts into arrays is good, but I don't REALLY need that... What you sent before works, but I need "error checking" like I said above and more in-depth parsing of the query string...

0
 
LVL 4

Expert Comment

by:mcix
ID: 1430019
Did you get this worked out, yet?
0
 
LVL 10

Author Comment

by:MasseyM
ID: 1430020
Get what worked out? -- I have it all working right now, but there are still occasions when errors occur...

So, I need some eror code checking enabled.
0
 
LVL 4

Expert Comment

by:mcix
ID: 1430021
E-mail your code to me @ marko_justus@hotmail.com

And I will try to help...
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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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 Month9 days, 18 hours left to enroll

762 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