<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bildon</author_name>
  <author_url>https://blog.hatena.ne.jp/bildon/</author_url>
  <blog_title>ビルドンブング</blog_title>
  <blog_url>https://www.bildon-yuma.com/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>WindowsAPIのMessageBoxがVBAのMsgBoxと大きく違うのは、ウインドウハンドルを指定できることである。 VBAのMsgBoxだとメッセージボックスは必ずエクセル側で表示されてしまう。例えば、WindowsAPIで他のアプリを操作していてエクセル以外のウインドウがアクティブになっていたら、そのメッセージは表示されない。タスクバーのエクセルアイコンが点滅して、自分でエクセルをアクティブにして初めて、メッセージボックスが表示されるのだ。その辺りはMsgBoxの実行前に「SetForegroundWindow Application.Hwnd」を挟んでおけばとりあえず対応はできる…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.bildon-yuma.com%2Fentry%2F2024%2F12%2F02%2F050000&quot; title=&quot;【VBA×WindowsAPI】APIのMessageBoxをVBAのMsgBoxと同じような感覚で使う - ビルドンブング&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-12-02 05:00:00</published>
  <title>【VBA×WindowsAPI】APIのMessageBoxをVBAのMsgBoxと同じような感覚で使う</title>
  <type>rich</type>
  <url>https://www.bildon-yuma.com/entry/2024/12/02/050000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
