3

I took an online VBA course back in June so I'm not sure if I turned something on/off but I can't record macros any more.

If I record a simple format text macro (hit record, select the text, choose yellow background, red text, select stop macro), when I run it, it takes me to the VBE and it pulls up with a compile error with VBA code I've never seen.

Here is a video http://somup.com/cYirn16eRa of the steps I took and what happens.

Here is the compile error.
error message - compile

I tried it on another computer and this is what the VBE should look like:
this is what it should look like

Community
  • 1
  • 1
TB in DC
  • 31
  • 2
  • Sometimes the macro recorder is buggy. Does the behavior persist if you restart Excel and/or use a completely new file? – BigBen Jul 21 '20 at 02:21
  • @BigBen you can see in the video it's a new instance of Excel and a new default file. – jamheadart Jul 21 '20 at 02:45
  • Very weird behaviour I've not seen before. It's like it's trying to record something completely different to what you're doing - do you have any add-ins functioning in Excel, anything you updated recently? – jamheadart Jul 21 '20 at 02:47
  • Found on another site that uninstalling and reinstalling office helped for some with similar issues: https://techcommunity.microsoft.com/t5/excel/excel-macro-recording-generate-wrong-vba/m-p/190857 – jamheadart Jul 21 '20 at 02:49
  • I have heard of incidents where deleting the temp files has solved problems with the macro recorder, check this (older) link: https://answers.microsoft.com/en-us/msoffice/forum/all/excel-record-macro-crashes/7bf7774f-f400-4ec4-8c87-73dd0e844f13 . However, you do this on your own risk. – Michael Wycisk Jul 21 '20 at 12:36

0 Answers0