Link to home
Start Free TrialLog in
Avatar of kwh3856
kwh3856Flag for United States of America

asked on

Getting a cascaded For Next loop to execute they way I need it to

I am trying to extract a series of data from a variable.  The variable is 102 characters long.  Each piece of data is 2 digits long.  Instead of writing 51 midstring statements, how can I create a for next loop to do the job.  Here is what I am thinking but I know I do not have the right syntax.  Help....Thanks


Kenny

            Dim X As Int16
            Dim Y As Int16
            For x = 1 To 51 and Y = 1 to 51
                Dim readingElaobj(X) As Int16
                readingElaobj(X) = Mid(readingElaObjNumbers, Y, 2)
                Y = Y + 1
            Next
ASKER CERTIFIED SOLUTION
Avatar of ptakja
ptakja
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kwh3856

ASKER

Thanks for the quick response.

Kenny