How to rectify this VBA Macro compile error?

mobilepoker2

New Member
Joined
Apr 1, 2021
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
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.
1617268095867.png


Please check this short video where I recorded my screen while creating the macro.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Macro gives compile error
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
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.
View attachment 35733

Please check this short video where I recorded my screen while creating the macro.
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Macro gives compile error
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Understood. Here are the cross-posts:

Can you please provide a solution now? This is critical for my research and I am not getting a solution anywhere else.
 
Upvote 0
Weird recording. Change:
Type. = "a"
to:
Range("A1") = "a"
 
Upvote 0
I can only suggest that you completely remove and reinstall Office. The macro recorder shouldn't produce complete garbage like that.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,867
Messages
6,122,002
Members
449,059
Latest member
mtsheetz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top