Hello Viorel.
Thanks for your reply to my dilemma.
Spent last night with MS Support reinstalling my Microsoft 365.
After I restarted the computer the code worked as intended.
Now, here's where I figured out the problem to be.
I also have Microsoft Office Ultimate 2007 installed on my computer, which I used to do all my prior work with Excel, Word, Access, PowerPoint, Visio, Outlook etc.
When I install Microsoft 365, it works, but, my MS Office Ultimate 2007 doesn't. something goes awry and I cannot open my my Outlook to manage my emails. I love this version of Outlook btw, more so than the new Mail application. I'm organized in Outlook 2007 and have thousands of emails in my pst file, which I cannot afford to lose.
When I try to open Outlook 2007 it complains that it must be re-installed. I go through the motions and it sets up properly and I'm able to open it. Then I try to execute the Microsoft 365 excel macro and it fails.
So it appears that the two environments cannot coexist.
I paid considerable money to have all the MS tools that I needed to do my work, and cannot afford to rebuy it. MS SQL Server, MS Visual Studio 2008, MS Visio are now prohibitively expensive.
I could do without the older version of Excel, Word, Access, PowerPoint, but I am not willing to drop Outlook 2007, unless MS does extensive work on redesigning Mail to provide the functionality of Outlook. Which I doubt.
Should I be able to move all my emails from Outlook to Mail, I could possibly put up with Mail.
But until then, it's a no go. Similarly with the likes of Visio. All the code and systems I built using the Visual Studio however, is a hard stop when having to do without it.
So, a bit long winded, but there you have it.
Your thoughts are greatly appreciated on this.
Thanks again for your reply.