Solved

from grid to array

Posted on 1998-08-23
1
146 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

829 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