What part of what trisuglow posted won't work in VBA?

Have you tried it in VBA?