Open excel workbook using a macro

Closed
nvanzyl - Oct 26, 2009 at 12:31 PM
 jim - Nov 18, 2009 at 02:11 PM
Hi, Can some1 help me open a workbook using a macro from another workbook.

Im working in two.xls and need to run a macro and open workbook one.xls?

Is this possible.

Tried the following:

Workbooks.Open FileName:="C:\Users\Bastard\Desktop\one.xls"

i just get a run time error 1004 - cant find this file. it is there trust me.

Please help.
Thanks.
Related:

2 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Oct 26, 2009 at 09:56 PM
It should work. try deleting the macro and retype the macro and see
6
Hi thanks for the reply.

I have deleted and tried again and no luck.
I created the same macro at work using my xp pc and office 2000. Here at home im using vista and office 2003.

Do u think its got something to do with vista or office 2003?

Thanks again for the help.
0
workbooks.open("c:\name\name\name")
worksbooks("c:\name\name\name").close

if you use .kill it will delete it
5