Print No. off page from cell.

KlausW

Board Regular
Joined
Sep 9, 2020
Messages
72
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
 

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
12,979
Office Version
  1. 2013
Platform
  1. Windows
@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.
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

KlausW

Board Regular
Joined
Sep 9, 2020
Messages
72
Office Version
  1. 2016
Platform
  1. Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
1,127,566
Messages
5,625,535
Members
416,116
Latest member
Joemamasuka

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