Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When recording a macro in Excel (2007) the recorder will often wrap the lines of code if they get to long by using a "_" character. This is all well and good except that there is apparently a hard limit of how many times a line can be wrapped in the VBA IDE, and if the recorder exceeds that limit it stops recording.

Is there any way to prevent the macro recorder from auto-wrapping the recorded code so that long lines can be recorded without blowing up the IDE?

share|improve this question
That limit is pretty high though no? What are you doing to create individual lines of code that long?! – Simon Cowen Jun 9 '11 at 9:39
@Simon Working with pivot tables. I was able to work out a solution to my coding problem, but an answer to this would still be nice to know – Xantec Jun 9 '11 at 21:07

I don't think this is configurable in the editor. You can get a few more charactors before going over the limit by changing your tab width options however.

  1. Click the Visual Basic button in the Developer Tab in Excel.
  2. Choose the Tools-Options menu.
  3. Change the Tab Width value to a smaller number.

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.