>>905
ActiveWindowならExcelVBAでもできる
https://www.officepro.jp/excelvba/window/index3.html