Quantcast
Channel: OKWAVE 最新質問(Visual Basic/257)【本日】
Viewing all articles
Browse latest Browse all 6510

[VBA]SpecialCellsが利かない?

$
0
0
選択範囲で定数(数値)が含まれているセルを表示する自作関数を 作成したいと考えていますがうまく動いてくれません。 以下のサンプルコードを実行すると選択した範囲全てが表示されてしまいます。 初心者で申し訳ないですがご教示下さい。 ■ 標準モジュールソース --------------------------------------- Function SAMPLE(SelectRange) For Each c In SelectRange.SpecialCells(xlCellTypeConstants, xlNumbers) MsgBox c.Value Next End Function --------------------------------------- → 再現方法:A1に「1」と入力して、B1セルに「=SAMPLE(A1:A2)」と入力 よろしくお願いします。

Viewing all articles
Browse latest Browse all 6510

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>