ExcecuteMacroXアクティビティで"パラメーターの数値が正しくありません。"

こんばんは
UiPath Studio 2025.0.172STS Community editionのユーザーです。

1.やりたいこと

ExcecuteMacroXアクティビティでExcelブック内マクロを実行したい。
マクロに渡す引数は、Sheetname, Range

2.悩んでいること

デバッグすると、ExcecuteMacroXアクティビティで下記のエラーが出ます。

UiPath.Excel.ExcelException: パラメーターの数値が正しくありません。 at UiPath.Shared.Activities.BaseParentActivityWithDescriptor`2.ResumeWorkBookmarkCallback(NativeActivityContext context, Bookmark bookmark, Object resumeActionObject)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

マクロの引数は、Sheetname=“行に縞模様をつける”, Range=“A1:C10”
なのですが、コードのどこが間違っていますか?

Fortunately, I resolved this issue on my own.

For your reference, here is the correct solution I found.

・The argument declaration in the first line of the macro was incorrect. Since I am not familiar with Excel macro notation, I comitted such a mistake.

Incorrect: Sub ApplyStripesToRows()

Correct: Sub ApplyStripesToRows(Sheetname As String, Range As String)

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.