I am trying to execute the following given macro from the current
workbook. The macro opens the workbook quot;2148.xlsquot; and waits there. It
does not proceed to run the macro quot;NextDayquot; 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:=quot;C:\Data\GLIF\2148.xlsquot;
Windows(quot;2148.xlsquot;).Activate
Application.Run quot;2148.xls!NextDayquot;
ActiveWorkbook.Save
ActiveWorkbook.CloseNextDay macro is as under:
Sub NextDay()
Sheets(quot;Summaryquot;).Select
Columns(quot;H:Hquot;).Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight
Range(quot;C6:C45quot;).Select
Range(quot;C45quot;).Activate
Selection.Copy
Range(quot;H6quot;).Select
ActiveSheet.Paste
ActiveWorkbook.Save
End Sub
- Nov 03 Mon 2008 20:47
Runing a macro in a workbook from another macro in other workbook
close
全站熱搜
留言列表
發表留言