2016-04-15 49 views

回答

1

然後喲需要自己來連接它:

i = 2 
Do 
    Content = Content & Range("A" & i).Value 
    i = i + 1 
Loop Until i > 5 
1

或者你可以試試這個:

Dim r As Range, Content As String 
Set r = Range("A1:A5") 
With Application 
    Content = VBA.Join(.Transpose(r), "") 
    Debug.Print Content 
End With 

無需循環。這是如果你只需要連接它。