Understand the Text Tools utility

If you don't fully understand how this utility works, I urge you to load the add-in and use the Debugger to step through the code. Try it out with different types of selections, including an entire worksheet. You will see that regardless of the size of the original selection, only the appropriate cells are processed, and empty cells are completely ignored. If a worksheet has only one cell with text in it, the utility operates just as quickly whether you select that cell or the entire worksheet.

If you convert the add-in to a standard workbook, you'll be able to see how the original data is stored in the worksheet for undo. To convert the add-in to a workbook, double-click the ThisWorkbook code module. Press F4 to display the Properties box and then change the IsAddin property to False .

0 0

Post a comment