Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dhatul
 
Posts: n/a
Default Runing a macro in a workbook from another macro in other 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"
ActiveWorkbook.Save
ActiveWorkbook.Close


NextDay macro is as under:

Sub NextDay()

Sheets("Summary").Select

Columns("H:H").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight
Range("C6:C45").Select
Range("C45").Activate
Selection.Copy
Range("H6").Select
ActiveSheet.Paste
ActiveWorkbook.Save

End Sub

Reply
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
Help:Running a macro in one excel workbook from another workbook R Kapoor Setting up and Configuration of Excel 3 January 13th 06 05:11 AM
Find Macro across workbook [email protected] Excel Worksheet Functions 3 January 4th 06 02:30 PM
Macro to open print window and set to print entire workbook retseort Excel Discussion (Misc queries) 1 October 27th 05 11:00 PM
Macro Help In Excel welshlad Excel Discussion (Misc queries) 14 October 26th 05 02:34 PM
workbook macro help ditchy Excel Discussion (Misc queries) 2 December 27th 04 04:48 AM


All times are GMT +1. The time now is 08:40 AM.

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"