Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2002
    Location
    Ontario, Canada
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Datagrid (Excel VBA)

    How do you link a datagrid to the ADO data control in Excel? In VB6 the DataSource property is used but what is the equivalent in VBA?
    <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    I'm confused
    Mary

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Datagrid (Excel VBA)

    Hi Mary,
    It's the same in VBA - e.g.
    <pre>Set dgrRisks.DataSource = ADODC1
    </pre>

    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    New Lounger
    Join Date
    Aug 2002
    Location
    Ontario, Canada
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Datagrid (Excel VBA)

    Thanks Rory

    That works.

    Mary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •