+ Reply to Thread
Results 1 to 8 of 8

Apply macro to all sheets!!!

  1. #1
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    126

    Apply macro to all sheets!!!

    Hi,

    I have a macro setup on a payroll sheet so that when the date is changed the current sheet is wiped. and is replaced with new dates and days. This is so there is never any confusion over times worked and in what month. They always have to be entered from scratch when the month is changed.

    I want my macro to update all sheets in the same way so that when i click on a box named january it updates all time sheets to january and deletes all the old data.

    Can anybody help?

    thanks in advance.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Sirishgreen,

    You would need to post your workbook. Since the information is confidential, you would need to create a smaller sanitized version for posting.

    Sincerely,
    Leith Ross

  3. #3
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    126

    thanks

    i forgot to make a copy before i came home so i will post when i get to work tomorrow.

    Thanks Leith

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Sirishgreen,

    Not a problem. I'll look for your post tomorrow.

    Sincerely,
    Leith Ross

  5. #5
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    126

    my test workbook

    Hey,

    There you go thats the workbook, Im trying to do a button for each month on the setup page, the code / macro would have to work for newly added sheets aswell, so when a new employee is added the spreadsheet can still be used.
    Attached Files Attached Files

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You can update the dates using formulas based on a master date in the setup sheet without using VBA
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I have added some code & formulas to simplify your updates
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    126

    thanks

    ok I have changed my method for that its no longer an issue but i am going to need some more help so im starting a new thread.
    Last edited by Sirishgreen; 09-26-2007 at 11:42 AM.

+ 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