Open an Excel-file from Access 2003

Open an Excel-file from Access 2003

am 29.10.2007 10:34:24 von laurasesma18

Hi,

I have a program in Access 2003 and written in Visual Basic. At some
point I would like to open an
Excel file automatly from Access 2003. So that the user can do some
changes in this file and then
close it. I don't want any connection with the program, only that it
open the file on its own.

If you have an idea of how I can do that It would be great.

Thank you,

Laura

Re: Open an Excel-file from Access 2003

am 29.10.2007 11:08:11 von lyle

On Oct 29, 5:34 am, laurasesm...@gmail.com wrote:
> Hi,

> I have a program in Access 2003 and written in Visual Basic. At some
> point I would like to open an
> Excel file automatly from Access 2003. So that the user can do some
> changes in this file and then
> close it.

You could run this code:

Application.FollowHyperlink "C:\Documents and Settings\Lyle Fairfield
\My Documents\HDSB\Temp.xls"

> I don't want any connection with the program, only that it
> open the file on its own.

Few files open "on their own". They require an executable program to
read and modify their contents.The command above will open the
executable file assoicated with the ".xls" extension and direct it to
open "temp.xls". In my case the temp.xls file will be opened within MS
Excel.

Re: Open an Excel-file from Access 2003

am 29.10.2007 13:53:44 von laurasesma18

Thank you. It has worked.

Re: Open an Excel-file from Access 2003

am 29.10.2007 22:03:04 von Dorothy

On Oct 29, 2:34 am, laurasesm...@gmail.com wrote:
> Hi,
>
> I have a program in Access 2003 and written in Visual Basic. At some
> point I would like to open an
> Excel file automatly from Access 2003. So that the user can do some
> changes in this file and then
> close it. I don't want any connection with the program, only that it
> open the file on its own.
>
> If you have an idea of how I can do that It would be great.
>
> Thank you,
>
> Laura

Hi Laura. Here's a good example of some code that opens up Excel from
Access. You can cater it to what you need, add a button and assign
this macro to it.

http://www.excelguru.ca/node/10

Good luck!