print from userform using range

still learning

Well-known Member
Joined
Jan 15, 2010
Messages
784
Office Version
  1. 365
Platform
  1. Windows
hi
I have a userforn that i use to print different pages.
The macro looks like this >>shorten to same space<<
VBA Code:
Select Case Me.ListBox1.Value
Case Is = "A": ActiveSheet.PrintOut from:=1, to:=2, copies:=1
Case Is = "B": ActiveSheet.PrintOut from:=4, to:=5, copies:=1
Case Is = "C": ActiveSheet.PrintOut from:=7, to:=8, copies:=1
case is goes to "Z"
Sometimes I have to change the page numbers>>From:=1, to:=2.... to say 3 or 4
then I have to adjust the printout
Could I instead use a Range? and How? Range A, Range B, etc. and have the "printout" do the entire range
I can then change only the range on the sheet. It would seem to be easier.


mike
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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
Back
Top