2 vba_Excel 词云

 Sub a9()
 Dim str As String
 str = ""
 ActiveSheet.Shapes.Range(Array("Cloud Callout 1")).Select
 For i = 3 To Application.CountA(Range("b:b")) + 2
    str = str + Range("b" & i) + "  "
    Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = str
   Next
   L = 1
   For i = 3 To Application.CountA(Range("b:B")) + 2
   
    With Selection.Characters(L, Len(Range("b" & i))).Font
        .Size = Range("c" & i)
        .ColorIndex = Range("d" & i)
    End With
    L = Len(Range("b" & i)) + 2 + L
        Next
        
    
 End Sub
 
 
 
   


你可能感兴趣的:(vba)