Print Preview through command button/Shape

azad092

Board Regular
Joined
Dec 31, 2019
Messages
173
Office Version
  1. 2007
Platform
  1. Windows
Hi
i have a data entry sheet including an interface sheet. on the interface sheet, I want to see the print preview for each sheet through clicking on the button/shape name for example
by clicking on Shape 1>> I want to see the sheet1 print preview
by clicking on Shape 2>> I want to see the sheet2 print preview
by clicking on Shape 3>> I want to see the sheet3 print preview
and so on....
Please guide me what I have to do
shapes.jpeg
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
8,478
Office Version
  1. 2016
Platform
  1. Windows
VBA Code:
Private Sub Label1_Click()
    Unload rpftForm
    ThisWorkbook.Worksheets("G Report").PrintPreview
End Sub
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,823
Messages
5,766,653
Members
425,367
Latest member
Boboka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top