Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Works in test mode, but Stops when doing normal run.
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 ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx ' 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 ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Works in test mode, but Stops when doing normal run.
What is the error message?
"BEEJAY" wrote: 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 ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx ' 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 ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
installed sp1 and now only compatability mode works | Excel Discussion (Misc queries) | |||
Works beautifully but stops half way through | Excel Programming | |||
Normal distribution test in excel? | Excel Discussion (Misc queries) | |||
Macro Works but not in Debug Step mode | Excel Programming | |||
Macro just stops in Step Mode | Excel Programming |