add new button column to datafgrid vba


  • Hello:

    I am developing a vba application (Microsoft Office 2002). I am using datagrid on it. I would like to know how to add a new button column on it.

    I have used following code:

    'I use a adodc control

    With dtctrlAlumnes
        .ConnectionString = _
        .Visible = False
    End With

    With dtctrlAlumnes
        .RecordSource = "select * from qryAlumnesSenseClasse"
        .Recordset.Filter = "IdCentre=" & gintCodiCentre
    End With

    Dim fra As Column
    Set fra = dtgrdAlumnes.Columns.Add(0)

    fra.Button = true
    fra.Visible = True
    fra.Width = 200

    but datagrid only displays recordset fields.

    Anyone knows what happens?

    Thanks in advance.


    Friday, January 25, 2013 12:00 PM

All replies

  • Hi xescjp,

    Welcome to the MSDN forum.

    I'm trying to involve some senior engineers into the issue and it takes some time. Your patience will be greatly appreciated.

    Have a nice day.

    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 28, 2013 9:52 AM
  • Thank you very much.
    Thursday, January 31, 2013 11:28 AM
  • Hi xescjp,

    Unfortunately, Office 2002 is no longer in mainstream support.  Normally I would suggest posting to the VB forums since the ADO data control is a VB control.  However, being VB6, it is also no longer supported.  The best thing I can suggest is to search some of the retired VB forums to see if you can find anything there.  Otherwise, hopefully someone else in the community has some suggestions.  Sorry I couldn't help!

    Search Forums:

    Sharon M, Microsoft Online Community Support

    Tuesday, February 05, 2013 2:51 PM