Is the example for the same version of Excel you have? If not, you must change some ActiveX calls.
Instead of that, check where the error occurs, and see if something is wrong with the property/invoke node command, to see which parameters are accepted, check the object browser in Microsoft Visual Basic For Applications, and look for that command.
Making Excel visible sometimes helps finding problems.
If you don't find any problem, perhaps someone has the sollution, but first you should say which LV version you are using, giving the Windows version too.
Hope this helps