Bad news. It works for me unedited/unchanged.
I have 64 bit Windows and 32 bit Office/Excel. It's a 365 subscription ... so, 2016 or whatever. Which versions(s) of Excel don't work for you? Are you missing any references in your VBA Project.
It may be that the newer versions are 64 bit and the code may be slightly different.
As Haluk has said, we would need to know where and how it fails for you.
Bookmarks