Excel in VBA the Left function is no longer working

a = Left("string",1) has stopped working.

If I open an old workbook (xlsm), a = Left("string",1) is fine. Save the workbook to a new name (.xlsm) and now we get a = left("string",1) and you get Compile error: Expected function or variable

Does anybody have any idea why?

Answer
Answer
This error is usually only a symptom, check for broken links in the references and remove them, resp. set the correct ones for your PC.

Another reason might be that you have declared a variable "Left" or a function with the same name anywhere in your code.

If you need further help please upload your file (maybe with anonymous data) on an online file hoster like www.dropbox.com and post the download link here.

A macro to anonymize data in selected cells can be downloaded here:
https://www.dropbox.com/s/rkfxuh85j5wyj9y/modAn...

Andreas.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated February 27, 2023 Views 1,926 Applies to: