Print from Command Button Range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've attached Macro to a Command Button in one worksheet called
"Worksheet"which I need to print a range in another worksheet called
"Summary". I have so far this line:

Worksheets("Summary").PrintOut Copies:=1, Collate:=True

Where do I add the range A1:A43?

Garyw
 
Worksheets("Summary").range("a1:a43").PrintOut _
Copies:=1, Collate:=True, preview:=true

(Preview:=true will save a few trees when you're testing.)
 
Dave

When I press the Command Buttom the print preview only shows one of the
pictures I inserted into to worksheet named "CutSheet". No text etc.

The code is as follows:

Private Sub CommandButton1_Click()

Worksheets("CutSheet").Range("a1:a43").PrintOut _
Copies:=1, Collate:=True, preview:=True
End Sub
 
Did you put the second picture in A1:A43?

If you test it manually
select a1:a43
file|print|Selection|Print preview
do you see both pictures?

Did you change one of the picture's properties so that it wouldn't print?
 
When I print this range manually it prints fine.
When I use the command button it gives a preview of only
one picture on the page.
 
I don't have another guess.
When I print this range manually it prints fine.
When I use the command button it gives a preview of only
one picture on the page.
 
Dave

I selected and named the print range "PrintRange" and changed it in the
formula.
It worked like a charm.

Private Sub CommandButton1_Click()

Worksheets("CutSheet").Range("PrintRange").PrintOut _
Copies:=1, Collate:=True, preview:=True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Macro 3
Run-time Error '9' 1
Macro to print a selected range, not entire worksheet 3
macro to standard module 9
Copy Range 3
Repeat form printing with new data by macro 1
Printing ranges 7
IfMacroPrintSheet 6

Back
Top