In addition to the advice you have already been given, check out How do I convert a VBA macro to Perl? which should give you a few pointers, failing that a super search may provide further help. If you are still having problem (after reading the article I link to and trying that approach) feel free to post the code you are having problems with.
Hope this helps
Martin
Comment on Re: How to convert the VBA code to Perl code?
Hi, Martin. Thank you for the link. I have read about it but the information is too little. I generate a Stock Chart with VBA code in macro. But when transferring it to Perl, I always get the Error: Win32::OLE(0.1707) error 0x80020009: "" in propertyput "ChargeType" at test2.pl line16. You can see the detailed programming code in the same page of the original question. Thanks for help!