Forum Discussion
patilosophy
Mar 31, 2021Copper Contributor
Macro gives compile error
Dear friends,
I am new to Excel Macro. I recorded a very simple macro (typed 'a' in cell A1) and saved it for testing. When I run the macro, it gives me a compile error. I suppose there is something wrong with my settings. The image is attached below.
Please help me out.
- It looks like someone else had this issue and was able to fix it by uninstalling/reinstalling office. That would be the only thing I could suggest as you're certainly not doing anything wrong.
https://techcommunity.microsoft.com/t5/excel/excel-macro-recording-generate-wrong-vba/m-p/190857
9 Replies
- JMB17Bronze ContributorIt looks like someone else had this issue and was able to fix it by uninstalling/reinstalling office. That would be the only thing I could suggest as you're certainly not doing anything wrong.
https://techcommunity.microsoft.com/t5/excel/excel-macro-recording-generate-wrong-vba/m-p/190857- patilosophyCopper ContributorThis was the last option but it worked. Thanks!
- patilosophyCopper ContributorDear Hans,
Your code is working well. But why is my macro not being recorded correctly? I searched for a solution everywhere but this problem seems unique to me.
Please check this short video where I recorded my macro.
https://youtu.be/clYd5nc2fN0
Thanks,
PratikAs I wrote in my first reply, it's weird. The macro recorder is far from perfect, but I haven't seen it mess up completely like this. It's clearly not your fault!