469,963 Members | 1,692 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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


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 1581
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
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.