+ Reply to Thread
Results 1 to 6 of 6

Auto repeat page

  1. #1
    Registered User
    Join Date
    02-16-2019
    Location
    Sweden
    MS-Off Ver
    2010, Ver 14
    Posts
    3

    Auto repeat page

    Hello!

    I have been working on some projects latley where i really couldnt decide what program to use.

    The sollution im after is a page that repeats.
    I started working in Word wich gave me a good looking document where i could handle the header and footer in a good way
    with no limits in what i could put there. I used the designer tab and added content control
    so that the end user or me couldnt mess up the document.
    Next was to create the page content.

    The document is designed to store test results during electrical testing or more specific save my test
    results when testing. The setup is made on the computer what is to be tested.
    The actual results are written manually like values, fail, pass, date and signed.
    I started working with a table design that looked good.
    Some sites that is to be tested are larger and demands more rows so i wanted an easy way for document do add another page looking the same
    as the first.
    No problem with the header and footer but the table gave me problems. After testing alot of ideas i gave up and started testing the same idea
    with Excel.

    When working in Excel the adding of a Header and footer gave me the interface i wanted.
    just click to add a new content and just like i wanted it to be.
    The header and footer design in Excel is really poor so i added a spread sheet function with repeating lines aswell
    and i was half way there,
    The footer design i wanted it to look like in Word but i was not able to do that and its not covered by repeating lines at the top of the
    document.

    Is it possible for the first page, page as in A4, landscape, with small margins print view with cell formatting and "design content" to duplicate
    like a spreadsheet to several pages if needed?
    If a person or me like a dummie is to use the document the repeating of pages has to be simple.

    Kind regards

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Auto repeat page

    Hello

    The way I would do this is:-

    Create a Master Sheet.
    Copy the Master Sheet and Call it Sheet1
    Hide the Master Sheet

    Create a macro to:
    Unhide The Master Sheet
    Create a New Copy Named Sheet2
    Hide the Master Sheet

    I usually use a tab to run the Macro.


    Ok I have created three macros for you.

    Run the Macro "StopMacro" when you first open the workbook. This stops the main macro and lets you explore.

    To see the main Macro, Right Click on the name "Create New" at the bottom of excel and select view code.
    This code runs when you select the Create New tab.
    It unhides the master, adds one to cell E2
    Creates a copy of the master
    hides the master

    E2 is used in two places and is important to the running of the macro.

    Once you are done exploring run the "StartMacro" so the main macro will work.


    Please Login or Register  to view this content.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 02-17-2019 at 05:27 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    02-16-2019
    Location
    Sweden
    MS-Off Ver
    2010, Ver 14
    Posts
    3

    Re: Auto repeat page

    Hello!

    Looks like an awsome sollution!
    Im not an expert on macros and rarely use them or never so i have a few questions.

    If i create three sheets and delete one and add one again.
    The last sheet number will be four. Can i correct this with a macro?

    If i add content controll that should be sheet specific how does
    the duplication of sheets handle this?

    If i add content controll that should cover the whole document or all sheets how does that work
    im after a function more or less like the header and footer.

    Also if i want a first or last page with content "to go" with 1 or 10 sheets this would
    be a describing sheet how the control was made accordingly to standards.
    Do i create 2 main sheets and run the repeating of the one i want to repeat?
    And if i want the "to go" sheet to be last in the document how do i handle this?

    Kind regards

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Auto repeat page

    1. If i create three sheets and delete one and add one again.
    The last sheet number will be four. Can i correct this with a macro?

    I can add a macro to delete a sheet if you want.
    I would write it so you can delete any sheet without ruining the Macro.
    I am not going to spend time on that until all your other questions are answered.

    2. If i add content control that should be sheet specific how does
    the duplication of sheets handle this?

    I do not understand. If you are modifying the Sheet after it has been created. Then there is no issue.

    3. If i add content control that should cover the whole document or all sheets how does that work
    I am after a function more or less like the header and footer.

    Create all that in your Master Sheet. Just be careful to use a sheet number and modify the
    Macro to refer to the right cell. Eg E2.

    4. Also if i want a first or last page with content "to go" with 1 or 10 sheets this would
    be a describing sheet how the control was made accordingly to standards.
    Do i create 2 main sheets and run the repeating of the one i want to repeat?
    And if i want the "to go" sheet to be last in the document how do i handle this?

    Not really understood.

    If you want a front Page then number that page 1. number the Master as page 2 at the start.

    If you want a "Last Page" then Create that at the Start and number that Page 3 at the start ( Assumes you have a front page )

    I have ammnded one line and added one line below

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-16-2019
    Location
    Sweden
    MS-Off Ver
    2010, Ver 14
    Posts
    3

    Re: Auto repeat page

    1. If i create three sheets and delete one and add one again.
    The last sheet number will be four. Can i correct this with a macro?

    I can add a macro to delete a sheet if you want.
    I can delete the pages manually without destroying the macro
    but it messes up the page index numbers.

    3. If i add content control that should cover the whole document or all sheets how does that work
    I am after a function more or less like the header and footer.

    Create all that in your Master Sheet. Just be careful to use a sheet number and modify the
    Macro to refer to the right cell. Eg E2.
    Ok i figured for controlling the doc i made a settings page. The master page where i want the information to
    end up i use in a specific cell i use this

    Please Login or Register  to view this content.
    No matter wich sheet it points to the Settings sheet and the cell where the info is located so it works like a header or footer.

    If you want a front Page then number that page 1. number the Master as page 2 at the start.

    If you want a "Last Page" then Create that at the Start and number that Page 3 at the start ( Assumes you have a front page )

    I have ammnded one line and added one line below
    You understood what i meant.
    I think the configuration would be SettingsPage, MasterPage, TestPage#, ...#, ...#, EndPage
    So the code would always put the last page in the end if i understand the code correctly.

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Auto repeat page

    We are looking good so far.

    You are right

    The hardest thing that the delete macro would have to do is to restore the page numbering.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Repeat first rows in the beginning for each page print + page nr
    By jokris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2016, 05:43 PM
  2. Repeat same formula on new page
    By knapp in forum Excel General
    Replies: 6
    Last Post: 11-16-2011, 04:35 AM
  3. Excel 2007 : Repeat page
    By jmo444 in forum Excel General
    Replies: 1
    Last Post: 12-12-2009, 12:14 AM
  4. [SOLVED] Rows to repeat on each page
    By jpreman in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-16-2006, 10:40 AM
  5. [SOLVED] data to repeat on each page
    By Mike in forum Excel General
    Replies: 2
    Last Post: 03-22-2006, 11:00 AM
  6. Repeat top rows on page to the right
    By mjones in forum Excel General
    Replies: 2
    Last Post: 03-07-2006, 11:50 PM
  7. [SOLVED] repeat first row at the top of page?
    By dumo13 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-03-2005, 08:06 AM

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