• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Print macro

Mike35

New Member
Hi All,

I found this forum after hours spent looking for solution. Hope someone can help:)
Recently start doing some work with vba but stuck with something.

I create a workbook with buttons and hyperlinks to the diffrent workbooks.
Few of the buttons are hyperlinked to workbooks which only contains certing form to print.
Hoewever I do not want to open this workbook when clik on the buton just print the sheet straight away or at least see the print prev option. Is this possible with marco?

Manny thanks Mike
 
Mike

Firstly, Welcome to the Chandoo.org Forums

Yes, what you want to do is possible with Macro's

I'd suggest starting by recording a macro
Start on the worksheet where you work
Start the Macro recorder by pressing the Record Macro button at the lower left corner of the Excel window
upload_2018-3-14_8-41-6.png

Type a Macro Name in and press Create
upload_2018-3-14_8-39-31.png

Follow the steps to do what you want
select the worksheet
Select the Range
Print the Range

keep going until you are finished

When you are finished press the Stop Record button

upload_2018-3-14_8-41-54.png

You can then go into VBA Editor Alt+F11 and tidy up the code if you wish
 
Hi Thanks for the quick replay.
I recorded the macro and its working in vba however once macro is assigned to the button its still only opens the linked workbook.
I think is to do with the active vindow.
I attached the macro
Regards,
 

Attachments

  • 2018-03-14 16.00.14.jpg
    2018-03-14 16.00.14.jpg
    365.8 KB · Views: 9
Back
Top