Solved

for cmix only

Posted on 1998-08-20
12
115 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 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
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

733 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