0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VBA_ワークシート名のクラス化

Posted at

次のようなワークシート名があったとします。(ワークシートの差し替えがあったり、入力する箇所が多かったりすると入力が煩雑になります。)

20250420_02.jpg

1.クラスモジュールを追加します。
2.クラスモジュールの名前をプロパティで変更します。ここでは「CommonWorksheetName」とします。
3.CommonWorksheetColumnNumberクラスモジュールをコーディングします。

CommonWorksheetNameクラスモジュール
Property Get 住所録() As String
    住所録 = "住所録_20250420062800"
End Property

4.使いたいモジュールの宣言セクションで宣言すると、インテリセンスにより自動メンバ表示が使えます。
20250420_03.jpg

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?