• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

How do I pull data from excel to VB form

I have an excel spreadsheet that I want to search names that are in columns C,D and E  grab info from the cells on that row and display the data in a textbox. Can anyone point me to a tutorial link or show me how to go about writing code that will pull data from an data source excel file and display the information.



Form.PNG
Consolidation---center-10-13-11.xlsx
0
bbarr0073
Asked:
bbarr0073
  • 5
  • 5
1 Solution
 
StephenJRCommented:
Where is the form?
0
 
bbarr0073Author Commented:
form now attached. thanks StephenJR
WindowsApplication1.sln
0
 
José PerezCommented:
VB classic or VB.Net?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
bbarr0073Author Commented:
VB classic, what would be difference. The way the data is stored?
0
 
José PerezCommented:
I used this in the past, think it should work for you:

http://www.developerfusion.com/code/5322/working-with-excel-files-using-vb6/
0
 
bbarr0073Author Commented:
What if I wanted to share this with multiple people. should it be .net and on a sql server. is there not a way to add the data to the application instead of storing in    xl.ActiveWorkbook.Close False, "c:\book1.xls"
0
 
José PerezCommented:
when you say "share" you mean available for others to work with the application at the same time?

if so, yes a better way would be using vb.net and sql server.

btw, vb.net is easy to handle if you used vb classic before:)
0
 
bbarr0073Author Commented:
I already have a sql server. do you have any smaple for what I am trying to do for .NET.

So I have a few question, IF this was setup on a sql server I can use the same form that I created? what would be needed to be on users computer to use it and will they maybe one day be able to edit the data is its not correct. that would be awesome!
0
 
bbarr0073Author Commented:
Thats right it is Visiual Studio 2010
0
 
José PerezCommented:
This thread is for vb classic and excel. For a vb.net and sql server you should create a new question.
0
 
José PerezCommented:
This should work ;)

http://www.codeproject.com/KB/office/Embedding_Excel.aspx

It contains the source code, also :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now