Hi, if I had say " x = 53" could I then have a code which counted down to row "53"?
Hi, if I had say " x = 53" could I then have a code which counted down to row "53"?
Hello Hurricanefly,
You will have to provide more detais about what you want to do. Your post is very vague. It is rather like asking "Is it further to school or by bus?".
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Hi, sorry about that! Basically I need to set a "Print Area" which only prints worksheets with data on them. The reason I ask about Row 53 is that it seems that there are 53 rows to print before a "New Page" is needed. The Print Area will always be in "B4:J53" (One Page) but there may be 600 rows on a worksheet or 53 on another? Very stuck, not sure if that helps?
Hello Hurricanefly,
The Print Area is range of cells that you choose. If you have 1 to 53 rows then setting the print range to "B4:J53" will in fact print only 50 rows total. If your rows on the worksheet go past 53 then you will need a macro to group the remaining rows into separate print areas. This will produce 1 page for each new print area. Is this what you want to do?
That is exactly what I would like to do. Is it difficult?
Hello Hurricanefly,
No, it is fairly straight forward. Can you post a copy of your workbook? I can then review the data and code you have to create a macro.
To Post Your Workbook
- At the bottom right of the Reply window, Click the button Go Advanced
- At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
- Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
- Click the Select Files button at the bottom middle of the dialog.
- In the new window Find the file you want to upload, select it, and Click Open.
- You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
- Wait until the file has completely uploaded before you exit the File Manager dialog.
File Manger Picture
Thank you.
Hello Hurricanefly,
Thanks for the workbook. I have a question about Sheet2. It starts in column A and goes to I while all the other sheets use column s"B:J". Since it is 9 columns wide, it isn't a problem for the macro. I was curious if you will have other sheets like Sheet2.
Sorry, I was mucking about with the original, and forgot to put column A back in. So no it will always be (B:J), sorry for the confusion.
Hello Hurricanefly,
No problem.
Hello
This macro will divide each worksheet into pages that are 50 rows by 9 columns and print the pages as it goes. After all the pages are printed for the worksheet, you will be asked if you want to continue to the next worksheet in the workbook.
![]()
Please Login or Register to view this content.
Than you that is perfectI was going to put a "Msgbox" in too so you kinda read my mind. I was not even close, appreciate your help.
Hello Hurricanefly,
'S e do bheatha!
You're welcome.
Hi, I just tried the code and got a "Run time error 438" on this line.Any ideas?![]()
Please Login or Register to view this content.
Hello Hurricanefly,
Which sheet?
Hello Hurricanefly,
Never mind, I found it. That was my fault it was a typing error. Here is corrected and tested code...
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks