close

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

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()