Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.