Skip to Content

Select a matrix row

Hi.

I've realized a simple addon with a user bounded matrix.

To the end of the matrix I can added programmatically a new row

Call mtx.AddRow(1, mtx.RowCount)

but when I try to clean (or populate) the new row, the cursor is positionated to the top of the matrix and then I operate on the 1st row instead on the last

mtx.SelectionMode = ms_NotSupported

Call mtx.SelectRow(row, True, False)

' clears the selected row

For Each col In mtx.Columns

Set cel = col.Cells(1).Specific

cel.Value = ""

Next

How can I select the last row?

Ciao. Nicola

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2005 at 06:55 AM

    Hi Nicola,

    when I need to reposition the row pointer in a matrix object (both system and user created), I use the following code:

    Dim rowIndex As Long

    m.SelectRow rowIndex, True, False 'm è l'oggetto Matrix

    Hope this helps

    Ciao

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.