We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Keep getting 'Next Without For' error in VB Excel even when they match up fine!

Options
I've written a very simple program in VB Excel containing a For loop.

When I run the macro it says 'Compile error: Next without For'.

There is only one For loop and there is one 'For' and one 'Next'.

I cannot see why it would complain - it is a very simple program and all other structures are in place i.e End If etc

I have noticed this error has come up far more since switching over to Excel 2003.

I hardly ever used to get this error with 2000 despite writing more complicated macros.

I'm going nuts over this problem.

Hope someone can help.


Thanks

L
"To be ignorant of one's ignorance is the malady of the ignorant." Amos Bronson Alcott

Comments

  • Tony_H_3
    Tony_H_3 Posts: 2,643 Forumite
    Part of the Furniture 1,000 Posts Combo Breaker
    Can you paste the code (PM) me if you would prefer not to share it.
  • MarkyMarkD
    MarkyMarkD Posts: 9,912 Forumite
    Part of the Furniture 1,000 Posts Combo Breaker
    Ditto - I'd gladly help if you posted or PM'd the code.
  • Tony_H_3
    Tony_H_3 Posts: 2,643 Forumite
    Part of the Furniture 1,000 Posts Combo Breaker
    Something tell's me you've exploited the bank holiday weekend!! Or we'll receive the code in 13 week's as your name is Maxwell and you are a current resident of BB6 icon7.gif
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.8K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.8K Work, Benefits & Business
  • 598.7K Mortgages, Homes & Bills
  • 176.8K Life & Family
  • 257.1K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.