- Konrad Kaltenbach
- PowerBuilder
- Monday, 10 May 2021 09:18 AM UTC
Dear Experts,
I want to call VisualBasic for Application (VBA) macros and functions in Word or Excel documents which I have written myself out of/from PowerScript functions (instead of rewritting them in the PowerScript functions).
Is this possible?
If it is: How is the syntax?
Assume, I have an Excel file with a macro Macro1() and a function Fct1(ByVal Something As String) As Integer in Module1 of its VBAProject and a PowerScript function containing the following lines:
"String ls_FileWithMacro
OLEObject xlsInstanz
ls_FileWithMacro = ... // Full name of the Excel file
xlsInstanz = CREATE OLEObject
xlsInstanz.connecttoobject( ls_FileWithMacro )"
How could I call Macro1 and/or Fct1 afterwards?
Thanks in advance for all trials to help me.
Kind regards,
Konrad Kaltenbach
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.