Delete pages

luis gaspper
StarLounger
Posts: 68
Joined: 03 Aug 2020, 05:23

Delete pages

Post by luis gaspper »

Dear experts,
Just a small change required if possible
I have the following code that works well at this link
https://eileenslounge.com/viewtopic.php?f=30&t=35095
I need to add a condition to Delete the following pages In the case if the data That has been transferred Less than or equal to 25 rows.
how should I do it? ... Attachment will make the issue more clearer.
Thank you in advance
You do not have the required permissions to view the files attached to this post.
Last edited by luis gaspper on 21 Aug 2020, 14:56, edited 1 time in total.

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Delete pages

Post by HansV »

If nobody else replies, I will look at it later.
Best wishes,
Hans

luis gaspper
StarLounger
Posts: 68
Joined: 03 Aug 2020, 05:23

Re: Delete pages

Post by luis gaspper »

Thanks very much for the reply.
thanks in advance

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Delete pages

Post by HansV »

Change the line

Code: Select all

    n = Application.Ceiling(m  / 25, 1)
to

Code: Select all

    n = Application.Ceiling((m - 1) / 25, 1)
Best wishes,
Hans

luis gaspper
StarLounger
Posts: 68
Joined: 03 Aug 2020, 05:23

Re: Delete pages

Post by luis gaspper »

Thank you so much for your help ... this has Really helped me.
Regards