Search : in
By :

Open excel workbook using a macro

Last answer on Nov 18, 2009 7:11:45 pm GMT nvanzyl, on Oct 26, 2009 4:31:53 pm GMT 
 Report this message to moderators

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.

Configuration: Windows Vista
Safari 532.0

Best answers for « Open excel workbook using a macro » in :
Excel – Macro to detect and hide blank rows Show Excel – Macro to detect and hide blank rows Issue Solution Note Issue I want a macro to unhide about 20 blank rows copy values into the top row then hide the remaining rows (some cells have fill though) then the next time it will...
Excel – Macro for copy & paste selected range Show Excel – Macro for copy & paste selected range Issue Solution Note Issue I have a summary of data by month in one sheet and the raw data in another sheet. Instead of creating multiple worksheets for my raw data for each month, I want...
System error: Microsoft Visual Basic ShowSystem error: Microsoft Visual Basic When opening Excel, you encounter the following error message. A window called "Microsoft Visual Basic" opens with the following contents: System Error & H80004005 (-2147467259). Unspecified error...
[VBA: VB6] Using excel from another application Show[VBA: VB6] Using excel from another application Here is a little routine to call Excel from VB6 or another Office application. Paste in a general module (eg Module1) In VBA>> Insert>> Module and paste in the window ... In VB6>>...
Excel tips : How to insert date in a cell ShowExcel tips : How to insert date in a cell Below are some tips on how to insert date and time in an excel cell for a specific purpose:- To insert current date, press CTRL + ; in the chosen cell. To insert current time, press CTRL+...

1

venkat1926, on Oct 27, 2009 1:56:41 am GMT
  • +2

It should work. try deleting the macro and retype the macro and see

Reply to venkat1926

2

nvanzyl, on Oct 27, 2009 4:18:00 pm GMT
  • +1

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.

Reply to nvanzyl

3

 jim, on Nov 18, 2009 7:11:45 pm GMT

Workbooks.open("c:\name\name\name")
worksbooks("c:\name\name\name").close

if you use .kill it will delete it

Reply to jim