Solved

for cmix only

Posted on 1998-08-20
12
112 Views
Last Modified: 2010-04-30
Her is your 50 for the VB question
0
Comment
Question by:MasseyM
  • 7
  • 5
12 Comments
 
LVL 4

Accepted Solution

by:
mcix earned 80 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

937 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now