Excel VBA質問スレ Pa ..
97:デフォルトの名無しさん
07/12/20 16:19:13
Sub nnn()
Dim a As Variant
Dim i As Byte
Dim sentence As String
Dim sentence2 As String
''''''''''''''''''''''
Range("A1").Formula = "I am Japanese."
a = Array("I", "am", "Japanese", "living", "in", "USA", ".")
For i = 0 To 6
sentence = Range("A1").Value
sentence2 = Replace(sentence, a(i), "", 1)
Next i
MsgBox sentence2
End Sub
このプログラムで、sentenceをa配列全て使って、
置換したいのですが、
array中の最後の文字しか変換されません。
どうすればよいでしょうか...
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
4745日前に更新/253 KB
担当:undef