Mac – How to Stop the Excel Macro Recorder from Auto-Wrapping Lines of Code

macrosmicrosoft excel

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?

Best Answer

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

Related Question