Compile Error & Error recording Macro

mikiel111

New Member
Joined
Mar 17, 2020
Messages
38
Office Version
  1. 365
Whenever i open a very particular excel file the VB ediot will load up and I get this message
"Compile Error:
Expected: expression"

I also get this message when trying to run a macro which previously worked or when closing this particular excel file.

When i try to record a macro I`m asked to name it then immediately get the message "unable to record"

Before I got this message I previously playing around with macro recording. I`d record many then delete the module when i wanted to change something about it.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
at the very top of the macro do you have

Option Explicit

that will help identify where the issue has been introduced
 
Upvote 0
bear in mind i know nothing about VBA and the macro was done & edited for me by other users from this forum*
*unique combinations generator

If by that you mean is it written in the vba code of the only macro I currently havent deleted then no (this macro has worked flawless before).
 
Upvote 0
I solved it be deleting the module and deleting the icon with assigned macro and re-pasting the VBA and making another macro. In my previous attempt to fix it I left the icon with assigned macro and it wouldnt work.
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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