Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

from grid to array

Posted on 1998-08-23
1
Medium Priority
?
152 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 80 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

916 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