Thread: Going Crazy
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default Going Crazy

Sheets("Weekly Stability Metrics").Select
Sheets("Weekly Arrival Data").Select

are these 2 sheets the only sheets in each particular workbook?
rather than selecting them & printing them individually, why don't you
try

Worksheets.PrintOut
or Sheets.PrintOut

or

Sheets("Weekly Stability Metrics").PrintOut Copies:=1, Collate:=True
Sheets("Weekly Arrival Data").PrintOut Copies:=1, Collate:=True
without selecting them.
:)
susan



On Jun 22, 11:40 am, Beep Beep
wrote:
Good Morning Everybody:

I have a macro that contains 12 sub macros. If I run the macro using the F8
Step Into command they all run fine. What they do is print out a chart and
the data from two different ws's in one wb. Running it with the Step Into
command it runs fine, however if I run it with the run command it works fine
for the first 7 and then for the last 5 it only prints out the chart and not
the data ws. The macro does not stop it just seems to by pass the second half
of the sub macro whereby it should bring up a print preview screen. Here is
a sample of the one that is bypassing the print preview command. Any Thoughts

Sub Print6030Chart()
Workbooks.Open Filename:= _
"C:\Documents and Settings\t_frankb\My Documents\Excel\Weekly
Stability Metrics\Weekly Stability Metrics
Reports\06182007\Charts\Weekly_Stability_Metrics_S C1x_6030_3.x_6_18_07.xls"


Sheets("Weekly Stability Metrics").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Weekly Arrival Data").Select
Application.Goto Reference:="PrintRange"
Selection.PrintOut Copies:=1, Preview:=True, Collate:=True
ActiveWindow.Close
End Sub

Thanks
Frank