Forum Discussion

patilosophy's avatar
patilosophy
Copper Contributor
Mar 31, 2021
Solved

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. 

 

9 Replies

    • patilosophy's avatar
      patilosophy
      Copper Contributor
      Dear 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,
      Pratik
      • HansVogelaar's avatar
        HansVogelaar
        MVP

        patilosophy 

        As 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!

Resources