Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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
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
installed sp1 and now only compatability mode works vince hummer Excel Discussion (Misc queries) 1 July 12th 08 02:09 PM
Works beautifully but stops half way through [email protected] Excel Programming 4 July 18th 06 07:37 PM
Normal distribution test in excel? strider257 Excel Discussion (Misc queries) 1 March 8th 06 04:55 PM
Macro Works but not in Debug Step mode Bob Smedley[_2_] Excel Programming 3 January 31st 06 04:28 PM
Macro just stops in Step Mode AccessNewbie Excel Programming 0 January 23rd 06 03:15 PM


All times are GMT +1. The time now is 12:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"