XLSM won't open due to ambiguous variable declaration

Thank you for looking at my question,

I have a macro-enabled .xlsm file - SPI.xlsm. Whilst making a minor change to the vba code behind it I managed to duplicate the declaration of a string variable.

Not fully paying attention to what I was doing I OK'd the warning message, closed the vba window and the xlsm file.

Now the file won't open, just hangs. There is an instance of Excel running in task manager processes and if I try to open the file again it tells me that the file is already open and locked for editing by me.

Please can anybody advise me how I can open this file / get to the vba code behind it again so that I can rectify the mistake?

Thank you in advance for your help
Gary CroxfordOperations Support AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ProfessorJimJamMicrosoft Excel ExpertCommented:
open task manager and then close Excel.exe from there.

then open a blank excel and then go to file then options then trust center and then go to macro security and then disable macros and then go and open your xlsm file and then delete the duplicate declaration and save and then go back and enable macro as it was before.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gary CroxfordOperations Support AnalystAuthor Commented:
Excellent - thank you for your help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.