6

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?

  • 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
4
+25

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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