Excel Selection Print Excel VB sheet

Asked By 240 points N/A Posted on -
qa-featured

Hi there,

I have developed an Excel VB sheet to generate transcripts. The application is simple. But I don't know how to print the page with macro. Currently, I just copy-paste the generated transcript to Word and print it manually. This is not looking much professional. So  I would like to make it automated.

Please help.

SHARE
Best Answer by Simmy C-me
Answered By 0 points N/A #97177

Excel Selection Print Excel VB sheet

qa-featured

Hi Albert,

It is very simple. You just issue the command PrintOut for the specified sheet. Suppose your transcript is in sheet 1. Then the command will be:

Sheet1.PrintOut

Answered By 240 points N/A #97178

Excel Selection Print Excel VB sheet

qa-featured

Thanks. But this gives a print out of the whole page. I need to print some selected region in the sheet named transcript only.

Answered By 0 points N/A #97179

Excel Selection Print Excel VB sheet

qa-featured

Then you have to just issue, Selection.Print instead of sheet.printout. This will print the selected region only.

Answered By 240 points N/A #97181

Excel Selection Print Excel VB sheet

qa-featured

How do I select the region? I need the region to be selected automatically when I press the print button. After the region is selected, it should issue the Selection.Print command.

Best Answer
Best Answer
Answered By 0 points N/A #97182

Excel Selection Print Excel VB sheet

qa-featured

Something like. Range("B3:L42").Select. This will select a rectangular region, with upper left cell B3 and lower right cell L42. Hope this helps.

Answered By 240 points N/A #97183

Excel Selection Print Excel VB sheet

qa-featured

Thanks. It is solved finally!

Related Questions