Print

  • Thread starter Thread starter Michael Vaughan
  • Start date Start date
M

Michael Vaughan

The VB book I have is very limited for excel. Is there a command in which I
can put for my input button that will print the page that I selected??

Thanks.. Michael
 
I'm not sure what you mean by "selected". did you select
it with the mouse? I think i tryed that and ran into
problems. I think i it would be best to have the code
select the print area but you gave no data structure so i
don't know really. but here is some code i use to select
and print.
Range("A1").Select
Selection.CurrentRegion.Select
ActiveWorkbook.Names.Add Name:="PrintStuff", _
RefersTo:=Selection, Visible:=True

ActiveSheet.PageSetup.PrintArea = "PrintStuff"
'ActiveWindow.SelectedSheets.PrintPreview
'ActiveWindow.SelectedSheets.PrintOut Copies:=2,
Collate:=True

the printpreview line and printout line are commented out
here. use when ever one you want.
 

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

Back
Top