Your code only changes the printarea. It doesn't actually print anything:
Private Sub CommandButton1_Click()
Worksheets("Print Data").PageSetup.PrintArea = "$A$1:$J$40"
Worksheets("Print Data").Printout
End Sub
Bafa wrote:
Private Sub CommandButton1_Click()
Worksheets("Print Data").PageSetup.PrintArea = "$A$1:$J$40"
End Sub
I did a search and tried to combine some results of what I found with
bits and peices of what I have been learning. Can someone show me what
I need to do here? Active wont work, because the page named "Print
Data" that I want printed from my workbook is not active. And my
experiment of inserting "Worksheets("Print Data")" in its place didn't
work. So what should I use instead?
--
Bafa
------------------------------------------------------------------------
Bafa's Profile: http://www.excelforum.com/member.php...o&userid=37748
View this thread: http://www.excelforum.com/showthread...hreadid=573626
--
Dave Peterson