LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.setup
R Kapoor
 
Posts: n/a
Default Help:Running a macro in one excel workbook from another workbook

I am trying to execute the following given macro from the current workbook.
The macro opens the workbook "2148.xls" and waits there. It does not proceed
to run the macro "NextDay" as given in line number 3.

However, if I execute the entire macro step by step from Visual Basic (using
F8) it works fine. What could be the problem? What is the solution.



Workbooks.Open Filename:="C:\Data\GLIF\2148.xls"
Windows("2148.xls").Activate
Application.Run "2148.xls!NextDay"
Sheets("2148").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$I$51"
ActiveWindow.SelectedSheets.PrintOut Copies:=2, Collate:=True
Sheets("Summary").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=2, Collate:=True
ActiveWorkbook.Save
ActiveWorkbook.Close


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get a validation to run in a macro on a shared workbook? arewa Excel Discussion (Misc queries) 3 January 2nd 06 11:31 PM
How do I emulate rightclick on a hyperlink in an Excel Macro Emulate RightClick on Hyperlink in Macro Excel Discussion (Misc queries) 0 January 2nd 06 08:40 AM
custom color palette does not get transferred with the workbook. Excel 2003 libra2222 Excel Discussion (Misc queries) 3 December 2nd 05 01:02 AM
Macro Help In Excel welshlad Excel Discussion (Misc queries) 14 October 26th 05 02:34 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM


All times are GMT +1. The time now is 08:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"