To copy data from excel in to datagrid in vb6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • reshma khan f
    New Member
    • Apr 2008
    • 1

    To copy data from excel in to datagrid in vb6.0

    Hi All,

    I m using Escel in VB6 .In that i want to copy datas from excel to datagrid.Not all datas but the selected one so that other can easily follow up.
    Note that m using ADODB connection in my project


    Kindly help me out as soon as possible!
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by reshma khan f
    Hi All,

    I m using Escel in VB6 .In that i want to copy datas from excel to datagrid.Not all datas but the selected one so that other can easily follow up.
    Note that m using ADODB connection in my project


    Kindly help me out as soon as possible!
    Remember you can manage Excel's cells as strings, and if you asign an Excel range to a Variant, that variant will become an array.

    so if you do something like

    [CODE=vb]dim a
    a = selection[/CODE]

    'a' will be then an 'easy to work with' array.

    HTH

    Comment

    Working...