マクロ上でのワイルドカードどうしの比較でエラーが出る。

The problem is that you are using the wrong equal sign node

画像の一番上のコメントには「仕事はありません」と書かれています

画像の一番下のコメントには「はい、機能します」と書かれています

will not work top
will work bottom

I hope my translation i did comes through okay but to say it again fully typed out and not translated

The top comment in this attached picture shows essentially what you are doing and you can not use it as such

You have to use the lower comment shown in picture method for compare strings

in English computer system you right click and can type “= string” and see the different methods for compare string

I’m not sure actually how you managed to even make that macro, when i try it will not let me even connect it up with wildcard