467,134 Members | 1,044 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,134 developers. It's quick & easy.

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
Aug 17 '07 #1
  • viewed: 1516
Share:
1 Reply
Expert 8TB
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.
Aug 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Mark | last post: by
3 posts views Thread by James Wong | last post: by
3 posts views Thread by Mitchell Vincent | last post: by
2 posts views Thread by Rod | last post: by
2 posts views Thread by Agnes | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.