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!

How can I open a excel specified sheet?

Status
Not open for further replies.

MikeCorleone

Programmer
Jul 26, 2001
2
GB
Hi,

I am doing a document gestion on access. I have a form with a box to complete. When you input a number inside the box, access display informations about the document related to the number.

For example: If you choose number 269, you could see the name of the document, the author, publication date, etc...

For some of the number, I have an excel sheet of the same name that the number (in this case 269.xls).

My problem is that, I can retrieve some information about this sheet (file exist or not, path) but I can't open it.

How can I do to open a file in a location, with the name given by the user?
If I write 269 in the box, access must open 269.xls
if I write 287 in the box, access must open 287.xls
.....

notes:
- All the files have the same format ---.xls
- All the files are in the same location

If you could help me please.
Thank you for reading this.
 
hi,

what exactly you want to do with it?

1. open it in an instance of excell
2. "view" it in some manner within access

if you answer this, I'm sure you'll get your answer soon

cpuburn
 
I want to open the file which has the same name that the number put in the box. The file have to be open in an excel session.
 
Look up the GetObject function in help. The example is how to open an excel file and will show you how to do it.

Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top