Quote:
|
Originally Posted by MJones58
And I can guess that the ActiveCell.Formula will work for anything where I want to keep the cell contents and edit them, like using F2 normally.
|
Sort of... ActiveCell refers to the Actual selected worksheet cell. You also have ActiveSheet, ActiveWorkbook...
In David's Example he used a loop that defined each cell in the selected Range to the 'rngCell' variable. This changed the reference of rngCel with each itteration of the loop.
This line:
rngCell.Characters(Start:=2, Length:=Len(ActiveCell.Formula)).Font.Bold = False
"ActiveCell.Formula" would not change, because the selection was not changed during the loop process. So if you had All bold entries it may not unbold all the caracters 2 to x if the text Length is less than whatever cell happend to be active.
See what I mean David? I think you would want to change this to:
rngCell.Characters(Start:=2, Length:=Len(rngCell.Formula)).Font.Bold = False
/