12
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

脱 Excel VBA

Last updated at Posted at 2022-02-15

脱 Excel VBA

20年前 (Excel2003) から進化せず VB6.0 のままで使われ続けてきた VBA も、そろそろ本格的に引退していただく状況になってきたのではないでしょうか?

VBA マクロをデフォルトブロックへ

VBA (Visual Basic for Applications) マクロ が仕込まれた Office 文書を悪用した、Emotet などのマルウェアへの対策として、ネットからダウンロードした Office ファイルの VBA マクロをデフォルトでブロックする (2022年4月上旬から順次展開) と発表した。

Excel における VBA の代替

VBA マクロに頼らない方法を紹介します。

Excel 内で完結する処理

LAMBDA 関数

カスタムの再利用可能な関数を作成し、それらを表示名で呼び出します。

Power Query

ブック内のデータや外部データに接続し、それらのデータを変換、結合、整形することができます。

オンラインで使用する処理

Office Scripts

Excel on the web で利用できるTypeScript 言語スクリプト。スクリプトは組織全体で共有できる。

Power Automate と連携することもできます。

Power Automate

豊富な コネクタ を組み合わせて処理を構成し、タスクを自動化します。

Excel 外を操作する処理

Power Automate for desktop

Power Automate の既存のロボティック プロセス オートメーション (RPA) 機能を拡張し、すべての繰り返されるデスクトップ プロセスを自動化できます。

PowerShell

UI を必要としない VBA マクロの処理は、すべて PowerShell に移植するつもりで良いと思います。

その他

Python in Excel

追記 (2023/09/15)

参考サイト

12
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?