The script is called as "run a script" as the last task in a rule.

I've MsgBox traced to display the values.

I wondered if CreateObject is OK for a macro but not a script?