<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>LimeCode</author_name>
  <author_url>https://blog.hatena.ne.jp/LimeCode/</author_url>
  <blog_title>和風スパゲティのレシピ</blog_title>
  <blog_url>https://www.limecode.jp/</blog_url>
  <categories>
    <anon>イベント処理</anon>
    <anon>基本の書き方</anon>
    <anon>ブック・ファイル</anon>
    <anon>VBA</anon>
  </categories>
  <description>ブックを閉じる際にマクロを自動で実行するにはBeforeCloseイベントを使用します。引数CancelにTrueを渡すと、ブックを閉じるのを中止できます。イベントを実行せずにブックを閉じるにはEnableEventsをFalseにします。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.limecode.jp%2Fentry%2Fsyntax%2Fworkbook-beforeclose&quot; title=&quot;ブックを閉じるときにマクロを自動実行する - BeforeClose - 和風スパゲティのレシピ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/154743825/1575205807164226</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-02-18 23:47:14</published>
  <title>ブックを閉じるときにマクロを自動実行する - BeforeClose</title>
  <type>rich</type>
  <url>https://www.limecode.jp/entry/syntax/workbook-beforeclose</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
