I have a macro that runs when I press ctrl-d. It should turn the selected text green and make it strikethrough.
However I want it to apply to selected text in a comment, not the text in the cell itself.
If I say:
Sub TaskFinished() With Selection.Font .Strikethrough = True .Color = Green End With MsgBox ("Ran macro!") End Sub
it works for the text in the cell (color doesn’t work but I can figure that out later), but only if the cell is selected (as opposed to being in F2 edit mode).
The message box only appears when I am not in edit mode. Seems a macro can’t even be triggered in edit mode at all?