I can't see how this question and the accepted answer will help any future visitors. The tags are wrong, the question is poor, and the answer is in C# while the OP asked for a VBA solution. The provided link will not translate the code into VBA. I flagged it but its been declined. And on top of that VBA != VB.NET. The answer has been accepted but it does not solve the problem.
Is there anything we are going to do about it or not?
case: yes - no further explanation needed
case: no - please explain to why