Advertisement

06.25.2007 at 04:27AM PDT, ID: 22655243
[x]
Attachment Details

Visual Basic 6 split to string array

Asked by DennisPost in VB Objects, Visual Basic Programming, VB Controls

Tags: split, basic, string, visual, array

Hi,
I need to load a string array from a single recordset field that contains vbCRLFs in VB6.
The idea is to break down these rs fields into lines so that I can create a neat plain text email with the information next to each other. (Don't know HTML yet)

So far I have this:
 'InStrCount counts the amount of specified delimiters from a certain position
'Rsado is the name of the recordset

            Dim bytI As Byte
            Dim bytSplits As Byte
            Dim strMN(15) As String
            Dim varMN(15) As Variant

            bytSplits = InStrCount(rsado!MN, vbCRLF, 1) + 1            
           
            For bytI = 0 To bytSplits
                strMN(bytI) = Split(rsADO!MN, vbCrLf, bytI, vbTextCompare)
            Next

This code keeps returning "runtime error 13 Type mismatch".
I have read a few articles and check out other code, none have the answer I need.
It does work if I use a variant array, but I can't see the information in the array. So I don't know if it's working or not.

ThanksStart Free Trial
[+][-]06.25.2007 at 04:33AM PDT, ID: 19354756

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:11AM PDT, ID: 19354912

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:18AM PDT, ID: 19354949

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:21AM PDT, ID: 19354967

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:26AM PDT, ID: 19355002

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:27AM PDT, ID: 19355008

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Objects, Visual Basic Programming, VB Controls
Tags: split, basic, string, visual, array
Sign Up Now!
Solution Provided By: tward
Participating Experts: 3
Solution Grade: A
 
 
[+][-]06.25.2007 at 05:28AM PDT, ID: 19355014

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:31AM PDT, ID: 19355031

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:33AM PDT, ID: 19355040

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:38AM PDT, ID: 19355064

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:44AM PDT, ID: 19355090

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:45AM PDT, ID: 19355095

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:45AM PDT, ID: 19355097

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.25.2007 at 05:46AM PDT, ID: 19355100

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:46AM PDT, ID: 19355102

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2007 at 05:51AM PDT, ID: 19355123

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32