Link to home
Start Free TrialLog in
Avatar of bssoftware
bssoftware

asked on

Powerbuilder and excel VBA.

Hi,

From my powerbuilder 8.0 application, I have to open an excel file with some parameters and same parameters I want to use in excel VBA as commandline() for further process.

Kindly help

Thanks,

Nagendra
Avatar of namasi_navaretnam
namasi_navaretnam
Flag of United States of America image

Be more specific as to what the paramters are supposed to do within excel.

I am not sure if I understand this correctly. I understand you would like to pass some parameteres to excel. But, what would the paramteres do within excel? Depends on what needs to be done, I am sure there is a way.

regards-
ASKER CERTIFIED SOLUTION
Avatar of berXpert
berXpert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
berXpert's solution is going to work well......

For the First part, You can also take a look at ShellExecuteEx function. For an example, go to :
https://www.experts-exchange.com/questions/20663647/opening-an-access-file-mde-from-PB.html
For passing parameters, use the lpParameters member of the st_shellexecuteinfo structure.

Regards,
Vikas
You can do this also:

You can connect to excel and the pass the paramters into a excel and read the value from that cell internally if you need.

string ls_parm
oleobject lole_excel
lole_excel = create oleobject

ls_parm = 'Parm1 Parm2'

ll_result = lole_excel.ConnectToNewObject( "excel.application")
lole_excel.application.workbooks.add( )
lole_excel.activesheet.cells(1,1).value = ls_parm
lole_excel.application.visible = true
if isvalid(iole_object) then destroy iole_object

regards-