|
http://www.vbalab.net/vbaqa/c-board.cgi?cmd=one;no=46399;id=excel
これですね!!
'========================================================================
Sub test3()
Dim idx As Long, jdx As Long
Dim rarray As Variant
rarray = Range("a1:a3").Value
Dim mycl As Variant
For idx = LBound(rarray, 1) To UBound(rarray, 1)
For jdx = LBound(rarray, 2) To UBound(rarray, 2)
rarray(idx, jdx) = StrConv(rarray(idx, jdx), vbKatakana)
Next
Next
Range("a1:a3").Value = rarray
End Sub
セル範囲の値を配列変数に格納し、カタカナ変換した後、再び元のセルに戻す
という方法です。
これだと、少しは速くなると思いますよ。
|
|