LoginSignup
2
3

VBA、この機能を実装してくれ!

Posted at

はじめに

私は業務でVBAを使ったマクロ開発する機会があるのですが、こんな機能が欲しいよ~というネタ満載記事です。

配列の要素数を取得する関数が仕様にない!

仕様にないので自分で作りました。

配列の要素数を取得するVBAマクロ

'配列の要素数を計算する関数
Function elem_count(ByVal max_elem As Integer, min_elem As Integer)
    Dim elem_sum As Integer
    elem_sum = max_elem - min_elem + 1
    elem_count = elem_sum
End Function

配列の要素数を取得する関数を実装してください、Microsoftさん

文字列の中に変数が組み込めない

ほんと苦労している、めんどくさい出力結果を結合演算子(&だったり+だったり)、関数(JoinやMid)でつなげたくないんです。

最後に

Microsoftさん、Office製品にPython実装してください!
(ベータ版あるけど)

2
3
2

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
2
3