D
Don M.
I use this portion of my macro to import two sheets from a workbook on our
network. The problem is that sheet B 2 may or may not be there. If it is't
then the macro just needs to go on without it and just import sheet B 1. I
need to figure out how to stop the macro from stopping and giving me an error
when sheet B 2 is not there.
' Import this weeks Work Order & Wrap Work Order
ChDir "\\fileserver\data\Global\Programs\PublicationOrdering\" & yy & mm
& sat
Workbooks.Open ("\\FileServer\Data\Global\Programs\PublicationOrdering\"
& yy & mm & sat & "\P___" & mm & fri & yy & ".XLS")
Sheets(Array("B 1", "B 2")).Select
Sheets("B 1").Activate
Cells.Select
Selection.Copy
Windows("Processor Run Sheet.xls").Activate
Sheets("B1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Don
network. The problem is that sheet B 2 may or may not be there. If it is't
then the macro just needs to go on without it and just import sheet B 1. I
need to figure out how to stop the macro from stopping and giving me an error
when sheet B 2 is not there.
' Import this weeks Work Order & Wrap Work Order
ChDir "\\fileserver\data\Global\Programs\PublicationOrdering\" & yy & mm
& sat
Workbooks.Open ("\\FileServer\Data\Global\Programs\PublicationOrdering\"
& yy & mm & sat & "\P___" & mm & fri & yy & ".XLS")
Sheets(Array("B 1", "B 2")).Select
Sheets("B 1").Activate
Cells.Select
Selection.Copy
Windows("Processor Run Sheet.xls").Activate
Sheets("B1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Don