+ Reply to Thread
Results 1 to 2 of 2

Need Help!! For each loop not executing

  1. #1
    Registered User
    Join Date
    01-24-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    3

    Need Help!! For each loop not executing

    Hi All,

    Below is my macro code to get the items from my pivots present in different sheets.

    Please Login or Register  to view this content.


    Can anyone please help what I am doing wrong? Pivot_One and Pivot_Two is made from Power Pivot model.

    Thanks!!
    Last edited by dominicb; 02-07-2018 at 07:51 AM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Need Help!! For each loop not executing

    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

    (I have added them for you this time, but please bear in mind when making future posts.)


    "For ... Next" loops need a For statement and a Next statement to complete.
    Your code doesn't seem to have a Next clsoing statement, or perhaps you're using nested loops and your Next statement come further down, beyond what you're showing to us.

    If you're used to PHP, that code doesn't need a Next statement to complete. VBA does.

    HTH

    DominicB

+ 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. Trying to avoid updating a source document when executing a FOR loop
    By VictorAmor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2017, 04:15 AM
  2. Stop timer, Do While Loop from executing.
    By Wijnand1 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-28-2017, 03:24 AM
  3. [SOLVED] Copy dynamically changing column and Paste using VBA Loop (Loop within Loop)
    By nixon72 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-12-2013, 12:46 PM
  4. [SOLVED] Nested IF only executing first loop statement
    By kewcumber in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-22-2012, 03:51 PM
  5. Excel 2007 : Sudden "freeze" while executing vba-loop
    By JohnFred in forum Excel General
    Replies: 2
    Last Post: 05-31-2010, 07:49 AM
  6. Inserting rows whilst executing a “For” loop
    By Graemes in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-24-2008, 06:30 AM
  7. [SOLVED] Executing a subroutine from within a loop
    By Jeff@DE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2006, 06:10 AM

Tags for this Thread

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