+ Reply to Thread
Results 1 to 13 of 13

Macro to navigate between worksheets

  1. #1
    Registered User
    Join Date
    07-19-2017
    Location
    Zambia
    MS-Off Ver
    2010
    Posts
    37

    Macro to navigate between worksheets

    Hi there,

    I have 3 visible worksheets in an excel file... Sales for the day (Sheet 1), Sales for the month (Sheet 2) and sales for the year (Sheet 3)

    These files obtain their data from hidden worksheets in the same workbook.

    I would like to design a macro with a loop that will move between the 3 worksheets at 30 second time intervals. But ignore the hidden worksheets

    Note that the output from the output from this file will be placed on a projector for the business to see.

    Please help

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Macro to navigate between worksheets

    This is one way to achieve your request:

    Please Login or Register  to view this content.
    Please do add reputation where you see fit, it's nice to be nice and we all enjoy a pat on the back

    Please also mark your thread as solved once it has been.

  3. #3
    Registered User
    Join Date
    10-23-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Macro to navigate between worksheets

    Dear luxy007

    Its a bit difficult to know what you want to move but you can make a loop in VBA and use this either in the top or the end of the loop;

    Please Login or Register  to view this content.
    The macro will then be running all the time until you define something that get it out of the loop. The problem with this solution, I think, is that you can't work in the workbook as long as it is running. Maybe other can help here.
    BR, Ipsenh
    (a.k.a. Excelpsen)

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: Macro to navigate between worksheets

    As per Ipsenh suggests...This will loop through the visible sheets every 30 seconds until you cancel
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Registered User
    Join Date
    07-19-2017
    Location
    Zambia
    MS-Off Ver
    2010
    Posts
    37

    Re: Macro to navigate between worksheets

    Hi PFDave.

    You are really and truly an Excel Ninja!!!!

    How do I make an addition to the above code and enable the pivot to refresh every 30 minutes while the macro is running.

    note that there will be a dedicated PC for the projector and this will run 24/7

    Your assistance will be highly appreciated

  6. #6
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Macro to navigate between worksheets

    apply this code to ThisWorkbook :

    Please Login or Register  to view this content.
    Then add this code to a module

    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Macro to navigate between worksheets

    Quote Originally Posted by luxy007 View Post
    Hi PFDave.

    You are really and truly an Excel Ninja!!!!
    And thanks, I appreciate all feedback

  8. #8
    Registered User
    Join Date
    07-19-2017
    Location
    Zambia
    MS-Off Ver
    2010
    Posts
    37

    Re: Macro to navigate between worksheets

    Hi PFDave,

    So sorry to bombard you with many questions. I am quite new to the world of VBA.

    Do i make the code like this when i add it to the module?

    Please Login or Register  to view this content.
    Last edited by luxy007; 07-24-2017 at 08:57 AM.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Macro to navigate between worksheets

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  10. #10
    Registered User
    Join Date
    07-19-2017
    Location
    Zambia
    MS-Off Ver
    2010
    Posts
    37

    Re: Macro to navigate between worksheets

    How would the new complete revised code look?

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Macro to navigate between worksheets

    Edit your previous post to add the code tags, please - do not create a new post instead!

  12. #12
    Registered User
    Join Date
    07-19-2017
    Location
    Zambia
    MS-Off Ver
    2010
    Posts
    37

    Re: Macro to navigate between worksheets

    Hi all,

    I would like to loop these 2 macros

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    07-19-2017
    Location
    Zambia
    MS-Off Ver
    2010
    Posts
    37

    Re: Macro to navigate between worksheets

    Thank you all this is solved

+ 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. navigate between worksheets
    By T. Grindlay in forum Excel General
    Replies: 10
    Last Post: 02-08-2012, 07:39 AM
  2. [SOLVED] Is there a keystoke to navigate between worksheets?
    By Vasant Nanavati in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 12:05 PM
  3. [SOLVED] Is there a keystoke to navigate between worksheets?
    By Vasant Nanavati in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  4. [SOLVED] Is there a keystoke to navigate between worksheets?
    By Vasant Nanavati in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  5. [SOLVED] Is there a keystoke to navigate between worksheets?
    By MMarv in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. Is there a keystoke to navigate between worksheets?
    By MMarv in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. Is there a keystoke to navigate between worksheets?
    By MMarv in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  8. [SOLVED] Is there a keystoke to navigate between worksheets?
    By MMarv in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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