Return to VBA Code Examples

VBA – 選択された行数を数える

選択された行数を数える必要がある場合は、Selection.Rows.Countを使用します。

選択された行数を数える

Public Sub CountMyRows()

MsgBox Selection.Rows.Count

End Sub

選択された列数を数える必要がある場合は、Selection.Columns.Countを使用します。

選択された列数を数える

Public Sub CountMyColumns()

MsgBox Selection.Columns.Count

End Sub

VBAのコーディングが簡単に

VBAのコードをオンラインで検索するのはもうやめましょう。AutoMacro – A VBA Code Builderについてもっと知る – 初心者が最小限のコーディング知識でゼロから手順をコーディングでき、すべてのユーザーのために多くの時間節約機能を備えています! alt text もっと詳しく

<<VBAのサンプルに戻る

vba-free-addin

VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)

Free Download

Return to VBA Code Examples