hi What way to access Excel data from visual basic (like Access with vb)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nithya jayaraman
    New Member
    • Jul 2007
    • 7

    hi What way to access Excel data from visual basic (like Access with vb)

    hi

    now i am using vb with MS Access ... but i have some information in excel wook sheet , so access that data and store to data grid then find out the average of the sheet 1 and sheet 2 and finaly store result in sheet 3

    like this
    data stored in
    sheet 1 have
    cell name A1:A10
    call Name B1:B10
    Sheet 2 have
    cell Name A1:A10
    call Name B1:B10

    take this range of values and display it and open the excel book also.
    calculate the average of sheet1 and sheet2( what range the user selected) and
    place the result in sheet3


    help meeeeeee
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Generally speaking, the quickest and easiest way to put together VB or VBA code to work with an Excel worksheet is to record the action as a macro in Excel. That is, tell Excel to start recording a new macro. Then do whatever-it-is yourself, manually. Then stop recording, and the macro now contains the code to do the task.

    To reuse that macro in future probably only requires a little editing, and if you want to create a program in "real" VB, you've got most of it there, ready to just copy over.

    Comment

    Working...