Print No. off page from cell.

KlausW

Active Member
Joined
Sep 9, 2020
Messages
378
Office Version
  1. 2016
Platform
  1. Windows
Hi, I use this VBA code to print a sheet with but it does not work. Now I want Excel to print the number of pages (A4) that are in cell E1.
All help will be appreciated.
Regards Klaus W
VBA Code:
Sub Lukaf_Rektangelafrundedehjørner1_Klik()

Dim intRaekke As Integer

Dim SidsteSide As Integer

SidsteSide = Sheets(intRaekke).Range("E1")

Sheets(intRaekke).PrintOut From:=1, To:=SidsteSide

End If

Next

End Sub
 
@KlausW - Here is an explanation that might help to determine exactly what you want:
1. We refer to sheets as worksheets in the workbook.
2. One sheet can contain many pages of data when sent to print.
3. If you say you want to print 5 sheets, then to us it would mean 5 worksheets which could be from 5 to 500 printed pages of 1 copy per page.
4. If you say you want to print 5 pages then then that would mean the first five print areas from 1 worksheet at 1 copy per page.
5. If you say you want to print 5 copies of a sheet, then that would mean to print as many pages as the sheet contains at 5 copies per page.
Hopefully, this will help you to be more specific about what you want as a printed product.
Specify how many worksheets you expect to queue into the printer.
Specify how many pages you expect (From and To) from each sheet.
Specify how many copies you expect of each printed page.
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi JLGWhiz, thanks for the help with the explanation, it's my big challenge to explain what it really is Excel should do, I can well see it for myself. But to tell others that I have a little difficulty with.
Best regards
Klaus W
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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