VB Works in test mode, but Stops when doing normal run.

G

Guest

Sub Combine_M2M_Extracts()
'
' Combine_M2M_Extracts Macro
' Macro created 9/22/2006 by John F. Scholten
'
' KeyBoard ShortCut: Ctrl+Shift+M
' ToolBar Icon: NONE
' Menu Item: NONE

' Call StartUpInformation

ActiveWorkbook.SaveAs Filename:="C:\DATA\Master.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

Application.ScreenUpdating = False
' Application.EnableEvents = False

' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

' Open/Activate # 1 File and Select Used Range
Workbooks.Open Filename:="C:\DATA\1.xls"
Windows("1.xls").Activate
Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy

' Activate Destination File, and Insert Rows
Windows("Master.xls").Activate
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Windows("1.xls").Activate

' Activate #1 File and Close
Windows("1.xls").Activate
ActiveWindow.Close
' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top