+ Reply to Thread
Results 1 to 18 of 18

Creating a persistent format across several pages

  1. #1
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Creating a persistent format across several pages

    Ok, I'm essentially creating a basic table and I have my first page created exactly how I want it. Header, footer with page numbers, and the main page consists of a table with borders, column headers, and every other row highlighted. I'm making the table for a small company to record the results of equipment tests that they have to run every morning. What I need it to do is to keep that format on every new page that gets activated. The users of this particular form that I'm making are not particularly computer savvy, so asking them to recreate the table everytime they need a new page would be asking quite a bit. Thanks.
    Last edited by Rusty1980; 02-02-2009 at 12:09 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Perhaps create a template sheet within the workbook that has everything laid out properly minus any data. Then hide that sheet.

    Now record a macro of you unhiding the sheet, copying it to a new sheet at the end of the workbook, then hiding the template sheet again.

    Show your people how to add a sheet by simply running the macro.

    If you post the name of the template sheet, plus any requirements you might want to add such as having the macro ask for new sheet name, or anything else, and post that in the programming forum, the guys watching that forum would probably make a slick macro for you if you're not happy with the results of your recorded macro.

    http://www.excelforum.com/excel-programming/
    Last edited by VBA Noob; 02-01-2009 at 05:22 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Creating a persistent format across several pages

    Thanks...I'll give that a try. I've never really worked with macros, so this should be interesting.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating a persistent format across several pages

    Give this a try as a macro, just edit the "sheet3" references to the name of the template sheet you're going to keep hidden.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Creating a persistent format across several pages

    Ok...this is what I have so far.

    Please Login or Register  to view this content.
    The problem I'm having is with the line 'range("L1").select'. Makes page 2 perfectly, but obviously won't create any following pages. Is there any way of making it paste to the top left cell of the next blank page?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Creating a persistent format across several pages

    Maybe ...
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Creating a persistent format across several pages

    Still only creating 2 pages. I don't want new sheets....I'll end up with a million sheets cluttering up the bottom of excel and I won't have an accurate page count. I just want a new page within the Step Wedge Test sheet so when they need to print them and turn their test results into the state, they will all print all at once.

    Here's the file. I'm working on it in page layout view.
    Attached Files Attached Files

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Creating a persistent format across several pages

    What you want is easy enough -- I just don't know what it is, sorry.

    Want to start at the beginning?

  9. #9
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Creating a persistent format across several pages

    I want sheet1, page 2 and page 3 and page 4 and page infinity to look exactly like sheet1, page 1...but I don't want them to be active pages until there is actually data entered on it. Unfortunately, I can't just copy the table onto consecutive pages because then they become active and I'm left with 1 page with actual data and a whole bunch of blank tables which screws up my running page count in the footer. What I need to happen is when I move onto page 2 it automatically replicates the table of page 1..ditto when I move onto page 3..etc.

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Creating a persistent format across several pages

    What I need to happen is when I move onto page 2 it automatically replicates the table of page 1..ditto when I move onto page 3..etc.
    1. How many sheets do you want to begin with?

    2. What event causes a new sheet to appear?

  11. #11
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Creating a persistent format across several pages

    Quote Originally Posted by shg View Post
    1. How many sheets do you want to begin with?

    2. What event causes a new sheet to appear?
    Just the one that I created. I want the next printed page, within my active worksheet, to be created when data table on the current page is filled up.

    I want it to do this (see picture)...only automatically and only when the tables have data on them so the page count stays accurate.
    Attached Images Attached Images

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Creating a persistent format across several pages

    want the next printed page, within my active worksheet, to be created when data table on the current page is filled up.
    What does "filled up" mean? When G44:K44 contains five entries?

  13. #13
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Creating a persistent format across several pages

    Quote Originally Posted by shg View Post
    What does "filled up" mean? When G44:K44 contains five entries?
    Essentially. When the user needs a new page because they can't fit any more entries on their current table.

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Creating a persistent format across several pages

    OK, put this in the sheet module for Step Wedge Test:
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Creating a persistent format across several pages

    Maybe I put it in wrong, but it created another worksheet. I can't have that.

  16. #16
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Creating a persistent format across several pages

    Ok.....new way of approaching it. I need a macro that copies my templated page and pastes it into the next empty cell in the A column. Can I get it to do that?

  17. #17
    Registered User
    Join Date
    02-01-2009
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Creating a persistent format across several pages

    Ok. Got it.

    Please Login or Register  to view this content.
    Thanks for the help.

  18. #18
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Creating a persistent format across several pages

    If you're happy, I'm happy.

    Now that I understand what you want, it's as simple as copying the row formatting down to the end of the worksheet, and setting heading rows repeat to the first couple of rows.

    In the Worksheet_Change event, set the print area to include the last data entry.

    If you have when you want with your approach, fine.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1