+ Reply to Thread
Results 1 to 3 of 3

Do loop not running

  1. #1
    Registered User
    Join Date
    04-28-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2003
    Posts
    24

    Question Do loop not running

    Hi there

    Appreciate any help as I am building on from this post here
    I have the below bit of code that I want to go through my pivot chart and make the last 7 days of data visible.

    I am having trouble with the Do loop. When I comment out the Do loop it runs okay. When I add the Do loop it dosen’t do the Do loop.

    Can anyone suggest anything?

    Here I am assuming that the date 07/09/2011 is the only date visible in the pivot chart. So when I run this macro the 11/09/2011 will also be visible in the pivot chart.

    When I get the do loop working I hope to have the 11th to the 18th visible( it is still in early stages so a bit of fine tuning needed also)

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by hattrick_123a; 09-21-2011 at 08:36 PM. Reason: [SOLVED]

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: Do loop not running

    Lastdate7 is set to be 7 days less than lastdate
    Your Do loop does not action because lastdate7 is already less than lastdate
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    04-28-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Do loop not running

    [SOLVED] thanks mudraker for pointing the obvious out for me!!

+ 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