Hi All,
Is there a way to print a set number of pages from a valve in a cell .. The cell value does change ..
I.E
Cell A1 value is set to 4 - I want to print 4 pages
or
Cell A1 value is set to 2 - I want to print 2 pages
And so ..
Thanks
Hi All,
Is there a way to print a set number of pages from a valve in a cell .. The cell value does change ..
I.E
Cell A1 value is set to 4 - I want to print 4 pages
or
Cell A1 value is set to 2 - I want to print 2 pages
And so ..
Thanks
I'm sure it's possible. You will have to write a macro for this.
I assume that your page breaks are set within page setup.
You will have to a page break count and depending on that cell value you mention, print that section if the page break count corresponds to what you have indicated.
You'll have to play around with that in a macro, you can use preview so you don't waste too much paper.
I haven't tried it but my guess this should work one way or another.
Hope I've bee bale to give you a hint that will solve your issue
---
Hans
"IT" Always crosses your path!
May the (vba) code be with you... if it isn't; start debugging!
If you like my answer, Click the * below to say thank-you
I agree with the above, but do you want for example pages 1-4, or 4 copies of page 1?
Hi Janger,
You can specify which pages in VBA similar to the way you do it manually in Excel. For Example to print pages 2 and 3:
See the attached file which contains a more robust example using the following code:![]()
Please Login or Register to view this content.
To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). https://www.excel-easy.com/vba/examp...-explicit.html![]()
Please Login or Register to view this content.
To enable Macros and to Run Macros see the following:
http://office.microsoft.com/en-us/ex...010031071.aspx
http://office.microsoft.com/en-us/ex...010014113.aspx
If help is still needed do a google search for 'youtube excel enable macro' and/or 'youtube excel run macro'.
To access Visual Basic (VBA) see:
http://www.ablebits.com/office-addin...a-macro-excel/
a. Click on any cell in the Excel Spreadsheet (may not be needed).
b. ALT-F11 to get to VBA.
c. CTRL-R to get project explorer (if it isn't already showing).
d. Double Click on a 'Module Name' in 'Project Explorer' to see code for that module.
Lewis
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks