<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>phithon</author_name>
  <author_url>https://blog.hatena.ne.jp/phithon/</author_url>
  <blog_title>phithonのブログ</blog_title>
  <blog_url>https://phithon.hatenablog.jp/</blog_url>
  <categories>
    <anon>excel</anon>
    <anon>vba</anon>
  </categories>
  <description>VBAには配列の長さを取得するLengthといったメソッドが存在しない。 そもそも配列にメソッドが存在するのかどうかも怪しい。 配列の長さを直接求める関数も存在しないため、以下の関数を利用する。 LBound 配列の最小インデックスを取得 UBound 配列の最大インデックスを取得 Sub PrintArray() Dim spl() As String spl = Split(&quot;a,b,c&quot;, &quot;,&quot;) ' [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]という配列を生成 Debug.Print UBound(spl) - LBound(spl) + 1 ' 配列の長さを取得したい場合 Dim i As Inte…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fphithon.hatenablog.jp%2Fentry%2F20101213%2Fexcel_vba_array_length&quot; title=&quot;Excel VBAで配列の長さを取得 - phithonのブログ&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>2010-12-13 00:00:01</published>
  <title>Excel VBAで配列の長さを取得</title>
  <type>rich</type>
  <url>https://phithon.hatenablog.jp/entry/20101213/excel_vba_array_length</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
