Stop Excel from writing into a VBA macro when clicking on the worksheet


I’m in the process of writing a VBA macro for Excel however whenever I click on a cell or press any keys in excel a line gets added to the bottom of my sub which look like


Is there any way to disable this?

I couldn’t find any resources online describing this problem.

>Solution :

It works like this when you are recording a macro. Make sure you are not recording if you don’t want it.

Leave a ReplyCancel reply