Just add a line like at the end
Uses a name range called Chart![]()
Range("Chart").PrintOut Copies:=1
http://www.contextures.com/xlNames01.html
As my profile says....London
VBA Noob
Just add a line like at the end
Uses a name range called Chart![]()
Range("Chart").PrintOut Copies:=1
http://www.contextures.com/xlNames01.html
As my profile says....London
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
I am using the code from your post #23
When you say put it at the end, where exactly do you mean?
I put it at the very end...went to debugger
I put it just before End Sub ... went to debugger
Not real sure where to insert the PRINT command for "Charts"
Thanks
BillofSoo
Do you name the range to print?
VBA Noob
VBA Noob
This is the code I am using to print the various arrays based on the criterion >50
![]()
Sub Test() Dim ArrRng As Variant Dim ArrPrint As Variant Dim i As Long ArrRng = Array("J28", "J38", "J50", "J61", "J73", "J93") ArrPrint = Array("S100:U161", "S163:U188", "S190:U218", "S220:U269", "S271:U313", "S315:U382") For i = 0 To UBound(ArrRng) With Range(ArrRng(i)) If IsNumeric(.Value) Then If .Value > 50 Then With ActiveSheet .Range(ArrPrint(i)).PrintOut Copies:=1 End With End If End If End With Next i End Sub
The code below is the code you wrote me last night and told me to put it at the "end" of the above code.(it is the module code you wrote in post #23 on this forum and it works fine).
Code:
I tried to just tag it to the end of the code you previsously wrote but it just causes errors.![]()
Range("Chart").PrintOut Copies:=1Uses
The range of the data on the Worksheet called "CHART" is B3:H40.
Where exactly do I insert this line into the code?
I feel a bit stupid but I'm new to this.
Would you mind telling me exactly where to insert the code to print the range B3:H40 from the worksheet "Chart"?
Thanks,
BillofSoo
Code can go before or after the loop code. So let's put it at the end
e.g
Note it won't work unless you have named the ranges as I've mentioned 3 times now. Link explains how to do that![]()
Next i SubRange("Chart").PrintOut Copies:=1 End
VBA Noob
Hi VBA Noob
Are you there?
BillofSoo
How did you get on?Hi VBA Noob
Are you there?
BillofSoo
VBA Noob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks