はこふぐのメモ

めもです

自分へのメモ BluePrism Excelのマクロを呼び出す

はこふぐです。

 

BluePrismでExcelのマクロを呼び出すには、MS Excel VBO の Run Macroが使える。

 

Runs the specified macro. Depending on how the macro has been created the name will be one of the following: A. Just the macro name e.g. MyMacro B. The workbook and macro name e.g. MyWorkbook.xls!MyMacro C. The workbook, worksheet and the macro name e.g. 'MyWorkbook.xls!'MyWorksheet.MyMacro
 
マクロがどう作られたかによってマクロ名は以下のようになる。
例A)マクロ名のみ。例)MyMacro
例B)ワークブック名とマクロ名。例)MyWorkbook.xls!MyMacro
例C)ワークブック名とシート名とマクロ名。例)MyWorkbook.xls!'MyWorksheet.MyMacro
 

f:id:sazanamifugu:20191116181351p:plain

入力パラメータ

 Handle おなじみの識別番号

 Macro Name マクロ名

出力パラメータはなし

 

動かしてみる

f:id:sazanamifugu:20191116181634p:plain

マクロが実行されました。

f:id:sazanamifugu:20191116181718p:plain

ところでこのOKを押すには、VBOからは無理なのだろうか。
ExcelをオブジェクトとしてAttachして操作するのかな?
プライバシーポリシー
©2019 はこふぐのメモ All rights reserved