Excelの全てのブックに対してフィルハンドルを無効化しつつ、ドラッグアンドドロップを有効にする方法は、**個々のワークブックではなく、Excelの「個人用マクロブック」**にVBAコードを保存することで可能です。この方法では、すべてのブックでフィルハンドル無効化が適用され、さらに保存時に拡張子を .xlsx
に保つこともできます。
個人用マクロブックは、すべてのブックで利用可能なマクロを保存する特別なブックです。
- Excelで個人用マクロブックを開く
- Excelを開き、
Alt + F11
キーを押してVBAエディタを開きます。 - 「VBAプロジェクト」ウィンドウで、
PERSONAL.XLSB
(個人用マクロブック)が表示されているか確認します。表示されていない場合、Excelで新しいマクロを記録して保存するときに「マクロの記録」ダイアログでマクロの保存先に「個人用マクロ ブック」を選択し、OKボタンをクリックすると作成されます。
- Excelを開き、