472,090 Members | 1,278 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,090 software developers and data experts.

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
1 1655
Killer42
8,435 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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.