Solved

from grid to array

Posted on 1998-08-23
1
143 Views
Last Modified: 2011-09-20
VB5
g = MSFlexigrid
Please help to put it to loop
Dim carray()
Dim i As Integer
ReDim carray(0 To g.Rows)
g.Col = 0
For i = 0 To g.Rows
g.Row = i
carray = f.Text
Next i
///
getting error message Cannot assign to array
decrementing g.rows -1
would not help
Thanks
0
Comment
Question by:mativare
1 Comment
 
LVL 4

Accepted Solution

by:
mcix earned 20 total points
ID: 1430511
   Dim carray()
    Dim i As Integer
   
    ReDim carray(0 To MSFlexGrid1.Rows - 1)
    MSFlexGrid1.Col = 0
   
    For i = 0 To MSFlexGrid1.Rows - 1
        MSFlexGrid1.Row = i
        carray(i) = MSFlexGrid1.Text
        MsgBox carray(i)
    Next i


Note: this will put the value of Column 0 for each Row in the grid into the variant carray()...
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
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.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 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

13 Experts available now in Live!

Get 1:1 Help Now