Solved

Read from Excel

Posted on 2000-03-07
4
165 Views
Last Modified: 2010-05-02
Is there a way to make VB read whatever is in Excel and posting it onto a form. After reading it can it save it on an Access database by a click of a button??
I need the answer ASAP please.

Any help is appreciated thanks!
0
Comment
Question by:hello_200
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
mbarreto022800 earned 25 total points
ID: 2595385
Here's a small example:

Dim Excel As New Excel.Application

Excel.Workbooks.Open "C:\ola.xls"
Excel.Application.Visible = False

MsgBox Excel.Application.Cells(1, 1).Value
0
 

Expert Comment

by:mbarreto022800
ID: 2595397
By the way you will need the Microsoft Excel 8.0 Object Library on your project (I'm not sure if there is a difference between versions).
0
 

Author Comment

by:hello_200
ID: 2607050
It is giving me an error message
"Invalid outside procedure"..plus the results will appear on a msgbox can't i put them in a text box?
0
 

Author Comment

by:hello_200
ID: 2607225
I have followed a different way of reading the information from excel and putting them in textboxes.
But thanks for your help!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question