Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Old A97 Database Requires amendment

Status
Not open for further replies.

ICCIIT

Technical User
Jul 21, 2003
62
GB
I am having to amend an Access 97 database to locate and extract cell data from multiple cells in an XL97 workbook kept in known location using a command button.

The code I have searched for on this forum does not seem to fit/work so I guess its code for more up to date versions of Access.

I need to start from scratch so please could someone help me to get through the next 6 steps for a Sub fired from a command button module:-

1) reference and open an existing XL workbook (either hard coded path or "open file dialogue" method)
2) go to Sheet1
3) pickup the value of cell A1
4) apply the value of cell A1 to a variable within the Access module
5) repeat step 4 for the other required cell values
6) close the XL workbook

Thanks in advance (and my apoligies for working with software that is now obsolete!)
 


Hi,

What code do you have so far and where are you stuck?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip
I do not have any code at all hence the need to start from scratch.

The way I understand it is that somehow I need to create an Excel object before I can then call and open a workbook.

I'm not sure where to start with the code to get the basics of interfacing the 2 applications.
 


Check out the CreateObject method in VBA Help. This has code examples that you can use.

Keep in mind that when you create an Excel application object, that object must be used to reference any Excel objects such as Workbook, Worksheet & Range.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top