Solved

for cmix only

Posted on 1998-08-20
12
114 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Updates not working for MS Windows 7 12 181
How to debug this code 7 64
Hide vba in gp 7 104
VB6 - Cannot type when doing an extract from MSHFlexgrid to Excel 6 18
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

791 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