- Barry Cheung
- PowerBuilder
- Wednesday, 6 January 2021 03:23 AM UTC
Hi,
I encounter following problem when execute excel macro in Powerbuilder.
Environment:
- Power Builder 2017 R3 on Windows 10
- Excel version is Excel for Office 365
Problem script:
try
lo_myoleobject.application.run("ThisWorkbook.change_data_format")
catch (oleruntimeerror er)
lo_myoleobject.disconnectobject()
destroy lo_myoleobject
return -1
end try
When execute above scripts, it return "Error calling external object function run at line 112 in function...."
The problem line is "lo_myoleobject.application.run("ThisWorkbook.change_data_format")"
However, there is no problem if use Excel 2003.
Please let me know what could be the issue?. Thanks.
Regards
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.