• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel macro for If 2 Pages happen, Automatic Insert "Please Turn Over" in Next Page's Footer

Dear Sir,

can any one help
for Excel macro for If 2 Pages happen, Automatic Insert "Please Turn Over" in Next Page's Footer?

Regards,
Chirag Raval
 
Please be more descriptive..."If 2 Pages happen,"

Do you have an Excel file that you have already started that you can upload so we can see the pages, etc.?
 
Dear Eloise T,

There are daily always new file created for many Customers (Buyers)
data copied from another source ...not fix that how many rows will be pasted in
current file.. if data about 45 to 50 lines that's okay...it can be print on A4
paper size in one page...but if data beyond 50 lines it falls on next page..
& if next page happened ....first page should give footer as " Please Turn Over" if 2 sided print...or Something pointing reader to "Continue..." etc...

if this can be achieved from Macro , as some automation that run based on
margins on A4, & lines falls in multiple pages ..that can put in footer,
"Continue..." or something else..

hope your Co-operations..

Regards,
Chirag Raval
 
Are you say
Dear Eloise T,

There are daily always new file created for many Customers (Buyers)
data copied from another source ...not fix that how many rows will be pasted in
current file.. if data about 45 to 50 lines that's okay...it can be print on A4
paper size in one page...but if data beyond 50 lines it falls on next page..
& if next page happened ....first page should give footer as " Please Turn Over" if 2 sided print...or Something pointing reader to "Continue..." etc...

if this can be achieved from Macro , as some automation that run based on
margins on A4, & lines falls in multiple pages ..that can put in footer,
"Continue..." or something else..

hope your Co-operations..

Regards,
Chirag Raval
Chirag,
It sounds like you are saying you are creating a new Excel file daily as you receive customer data. When you print out the report, you want to alert the reader, by virtue of the "Continue..." at the bottom of the page, if there are more than 50 rows, in which case the printer has automatically printed the overage to the second side of the paper, correct? So your VBA needs to simply put "Continue..." after each 50 rows. Assume you already have 49 rows of data and now the 50th rows is being added...where, specifically (which cell), do you want "Continue..." placed on the Excel sheet?
 
Dear Eloise t,

Thanks for the reply & sorry for Wrong Catch ...
Programmatically put footer...on 1st page if lines on A4 paper goes beyond 1 page...not in cell..

Regards,
Chirag Raval
 
Wouldn't "Footer" would be for MS Word? I thought we were talking about a daily Excel spreadsheet you were creating each day?
 
Chirag R Raval
Add below code just before Your printing ...
Code:
Sub Test_This()
    With ActiveSheet
        PSRF = Empty
        If .HPageBreaks.Count + 1 * .VPageBreaks.Count + 1 > 1 Then PSRF = "Please Turn Over"
        .PageSetup.RightFooter = "&R " & PSRF
    End With
End Sub
 
Dear Sir,

Compile Error
"Variable Not Defined"

on "PSRF = Empty"

if PSRF is part of Excel VBA or excel.. then what this code want?
if we put Dim PSRF AS ??????? What Types Of This Variable Can Be?
is PSRF is an object & part of Excel Model?

Please do needful.

Regards,
Chirag Raval
 
Chirag R Raval
You just asked to get few lines for Your code.
I cannot know what else do You have there; normally I want to test.

I do not declare variables ...
If You need to do so
then You gotta do so as You reply let me understand.

PSRF = '.PageSetup.RightFooter' and it is a string.
... and that "&R " in front of PSRF should include only with
PSRF = "&R Please Turn Over"
(&R ... work or not, depend Excel-version; would move text to right side)

> Why PSRF? ... as You wished that sometimes NO "Please Turn Over" and sometimes there would be ... default is NO that 'extra text'.
 
Dear Sir Veltm,

sorry for firstly I can not understand this simple concept..
& thanks for Working Code..

Blank variable PSRF (string) ..only get assign value as "Please Turn Over"
if ....Page Break goes beyond page 1....& apply that string in footer

It Works...But ..It can be auto recognise. by excel itself....as part of an excel..& always lookup in every new file or sheet..if data goes beyond 1st page.. auto put footer...

can it be possible?

Regards,
Chirag Raval
 
Many things could be possible.
My Excel version do not have that kind of option for that.
And ... if You mean to have fixed footer setting for ALL files and that would work same way with all users everwhere ... hmmm ... seems to be wild idea.
... for me, so far those setting would be only for one file.
If I should use something like that I would use setup like 'my sample' with VBA.
There could be other way too, if Your Excel-version has feature to solve how pages You'll print before printing (but if other users do not have same feature, then ... it won't work). You can find out it by checking Your Excel's possible 'Activesheet'-parameters.
Screen Shot 2017-07-01 at 11.50.27.png

Screen Shot 2017-07-01 at 11.50.18.png
 
Deal vletm,

Thanks for your guidelines.

"Add In" that always available & active all the time..in all new file ...New Sheets...I don't know more about..how construct. But may be "Add Ins" connected with "Events"..."if Next Page Event..Happened & ...recognised, then quickly run this macro...put footer...on active sheet...."

Same like ...you noted that...if user go to print preview.."Page 1" displayed at bottom, if data is in criteria of (1) page size (2) margins only "Page 1" displayed.....if just single character goes next line or cross the "Margin", or page size change .., quickly displayed "page 1 of 2"... and also user delete some rows or increase margins...or page size change....quickly disappear page 2 only "page 1" displayed.... that probably invent driven procedure in built in excel ...
hope can be available in next Excel Version or
or if we can make Add-in ...(if not overload on memory).

hope understand my point of view...

Regards,

Chirag Raval
 
It is more safer for users to print only one side of paper
if they cannot check other side of paper.
... or why there is always that other side of paper?
As normal, there should be that tiny, almost unreadable, text printed in the end of any document, which tells the most important things.
 
Dear Sir,

Actually..."Paper Saving" & "Cost Saving" is the main concept...behind
"Please Turn Over"...

anyway...Thanks for awaken me...

Okay...I unnecessary goes more deeper in this little concept.."Footer".
actually unconsciously divert to "Add-Ins"
That CAN become another thread..

this thread ""Footer" ... stop here...please
thanks again sir... for you code that work as desired..
I appreciate your help..

Regards,

Chirag Raval
 
Back
Top