LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default error: Code Execution has been interrupted

Some may be reluctant to open a .txt file for some reason so here is macro:

Sub XfmrRept()
'
' XfmrRept Macro
' Macro recorded 12/17/2001 by C20656
'
' Keyboard Shortcut: Ctrl+t
'
ChDir "G:\EXCEL50\Xfmrrept"
Workbooks.Open Filename:= _
"\\DS5\SYS2\STORES\GROUP\EXCEL50\Xfmrrept\kuhlman. xls"
Workbooks.Open
Filename:="\\DS5\SYS2\STORES\GROUP\EXCEL50\Xfmrrep t\ermco.xls"
Workbooks.Open Filename:= _
"\\DS5\SYS2\STORES\GROUP\EXCEL50\Xfmrrept\xfmrall. xls"
Windows("ermco.xls").Activate
Sheets("Transformer Issues and Transfer").Select
Sheets("Transformer Issues and Transfer").Copy
Befo=Workbooks("xfmrall.xls").Sheets(1)
Windows("kuhlman.xls").Activate
Sheets("Transformer Issues and Transfer").Select
Sheets("Transformer Issues and Transfer").Copy
Befo=Workbooks("xfmrall.xls").Sheets(1)
Windows("ermco.xls").Activate
ActiveWindow.Close
Windows("kuhlman.xls").Activate
ActiveWindow.Close
ActiveWindow.TabRatio = 0.568
Sheets("Transformer Issues and Tran (3)").Select
Sheets("Transformer Issues and Tran (3)").Name = "Issues &
Transfers-Kuhlman"
Sheets("Transformer Issues and Tran (2)").Select
Sheets("Transformer Issues and Tran (2)").Name = "Issues &
Transfers-ERMCO"
Sheets("Transformer Issues and Transfer").Select
Sheets("Transformer Issues and Transfer").Name = "Issues & Transfers-All
Xfmrs"
Sheets("Issues & Transfers-Kuhlman").Select
Workbooks.Open Filename:= _
"\\DS5\SYS2\STORES\GROUP\EXCEL50\Xfmrrept\xfmr0102 05.xls"
Rows("1:4").Select
Selection.Copy
Application.CutCopyMode = False
Sheets(Array("Issues & Transfers-Kuhlman", "Issues & Transfers-ERMCO", _
"Issues & Transfers-All Xfmrs")).Select
Sheets("Issues & Transfers-Kuhlman").Activate
Rows("1:4").Select
Selection.Copy
Windows("xfmrall.xls").Activate
Sheets(Array("Issues & Transfers-Kuhlman", "Issues & Transfers-ERMCO", _
"Issues & Transfers-All Xfmrs")).Select
Sheets("Issues & Transfers-Kuhlman").Activate
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Rows("5:5").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Rows("5:40").Select
Selection.RowHeight = 15
Range("A5").Select
Sheets(Array("Issues & Transfers-Kuhlman", "Issues & Transfers-ERMCO", _
"Issues & Transfers-All Xfmrs")).Select
Sheets("Issues & Transfers-Kuhlman").Activate
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
Sheets("Issues & Transfers-All Xfmrs").Select
With ActiveSheet.PageSetup
.PrintTitleRows = "$4:$4"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
Sheets("Issues & Transfers-ERMCO").Select
With ActiveSheet.PageSetup
.PrintTitleRows = "$4:$4"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
Sheets("Issues & Transfers-Kuhlman").Select
With ActiveSheet.PageSetup
.PrintTitleRows = "$4:$4"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
Windows("xfmr010205").Activate
ActiveWindow.Close
End Sub


 
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
Code Execution Has Been Interrupted LCK[_2_] Excel Programming 2 November 18th 05 12:25 AM
code execution has been interrupted del Excel Discussion (Misc queries) 0 September 3rd 05 12:22 PM
code execution has been interrupted François Excel Discussion (Misc queries) 1 February 18th 05 11:06 PM
Code Execution has been Interrupted JPutman Excel Programming 4 August 24th 04 02:17 PM
Code Execution Has been Interrupted Adrian[_7_] Excel Programming 0 July 30th 04 10:02 AM


All times are GMT +1. The time now is 01:29 AM.

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

About Us

"It's about Microsoft Excel"