Home > Software design >  Stop Excel from writing into a VBA macro when clicking on the worksheet
Stop Excel from writing into a VBA macro when clicking on the worksheet

Time:04-06

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

Range("B12:F19").Select
Range("F19").Activate
Selection.Copy

Is there any way to disable this?

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

CodePudding user response:

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

CodePudding user response:

I figured out the problem. In the developer tab of excel I had "record macro" toggled on. toggling it off fixed the problem.

  • Related