hexagon logo

Excel Balloon or Bubble Creator

Attach is a Excel Balloon or Bubble Creator that I used before Discus.

Bubble Print.zip
Parents
  • Here is the VBA Code for Module1
    Option Base 1
    Dim intCounter As Integer
    --------------------------------------------------------------------------------------
    Sub CreateLabel10()
    Dim objshape As Object
        'Retrieve and set starting label
        SetStartingLabelNbr
        
        'Create new shape
        ActiveSheet.Shapes.AddShape(msoShapeOval, 305, 3#, 25.5, 25.5).Select
        Set objshape = Selection
        Selection.ShapeRange.TextFrame.MarginLeft = 0#
        Selection.ShapeRange.TextFrame.MarginRight = 0#
        Selection.ShapeRange.TextFrame.MarginTop = 0#
        Selection.ShapeRange.TextFrame.MarginBottom = 0#
        Selection.ShapeRange.Fill.Transparency = 1
        Selection.ShapeRange.Line.Transparency = 0#
        'Format the shape
        objshape.Characters.Text = intCounter
        With objshape.Characters(Start:=1, Length:=Len(intCounter)).Font
            .Name = "Arial"
            .FontStyle = "Regular"
            .Size = 10
            .ColorIndex = 3
        End With
        'increase shape size for number of digits
        With objshape.ShapeRange
        objshape.Characters.Text = intCounter
    'Added (objshape.Characters.Text = intCounter)Above
            .Line.ForeColor.SchemeColor = 10
    'Added (.LockAspectRatio = msoFalse)Below
            '.LockAspectRatio = msoTrue
            .LockAspectRatio = msoFalse
            '.Height = 15.25
            If intCounter < 10 Then .Width = 15.5
            If intCounter >= 10 And intCounter < 100 Then .Width = 21.5
            If intCounter >= 100 And intCounter < 1000 Then .Width = 25.25
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Width = 26.25)Above
            If intCounter >= 1000 Then .Width = 36.25
            If intCounter < 10 Then .Height = 15.5
            If intCounter >= 10 And intCounter < 100 Then .Height = 15.5
            If intCounter >= 100 And intCounter < 1000 Then .Height = 15.5
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Height = 15.25)Above
            If intCounter >= 1000 Then .Height = 15.5
        End With
    Selection.HorizontalAlignment = xlCenter
        'increment shape number and store in text box
        intCounter = intCounter + 1
        ActiveSheet.TextBox1.Text = intCounter
    End Sub
    --------------------------------------------------------------------------------------------
    
    Sub CreateLabel12()
    Dim objshape As Object
        'Retrieve and set starting label
        SetStartingLabelNbr
        
        'Create new shape
        ActiveSheet.Shapes.AddShape(msoShapeOval, 305, 3#, 25.5, 25.5).Select
        Set objshape = Selection
        Selection.ShapeRange.TextFrame.MarginLeft = 0#
        Selection.ShapeRange.TextFrame.MarginRight = 0#
        Selection.ShapeRange.TextFrame.MarginTop = 0#
        Selection.ShapeRange.TextFrame.MarginBottom = 0#
        Selection.ShapeRange.Fill.Transparency = 1
        Selection.ShapeRange.Line.Transparency = 0#
        'Format the shape
        objshape.Characters.Text = intCounter
        With objshape.Characters(Start:=1, Length:=Len(intCounter)).Font
            .Name = "Arial"
            .FontStyle = "Regular"
            .Size = 12
            .ColorIndex = 3
        End With
        'increase shape size for number of digits
        With objshape.ShapeRange
        objshape.Characters.Text = intCounter
    'Added (objshape.Characters.Text = intCounter)Above
            .Line.ForeColor.SchemeColor = 10
    'Added (.LockAspectRatio = msoFalse)Below
            '.LockAspectRatio = msoTrue
            .LockAspectRatio = msoFalse
            '.Height = 15.25
            If intCounter < 10 Then .Width = 19.5
            If intCounter >= 10 And intCounter < 100 Then .Width = 23.5
            If intCounter >= 100 And intCounter < 1000 Then .Width = 29.25
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Width = 26.25)Above
            If intCounter >= 1000 Then .Width = 40.25
            If intCounter < 10 Then .Height = 19.5
            If intCounter >= 10 And intCounter < 100 Then .Height = 19.5
            If intCounter >= 100 And intCounter < 1000 Then .Height = 19.5
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Height = 15.25)Above
            If intCounter >= 1000 Then .Height = 19.5
        End With
    Selection.HorizontalAlignment = xlCenter
        'increment shape number and store in text box
        intCounter = intCounter + 1
        ActiveSheet.TextBox1.Text = intCounter
    End Sub
    -----------------------------------------------------------------------------------------------------------------------------
    
    Sub CreateLabel8()
    Dim objshape As Object
        'Retrieve and set starting label
        SetStartingLabelNbr
        
        'Create new shape
        ActiveSheet.Shapes.AddShape(msoShapeOval, 305, 3#, 25.5, 25.5).Select
        Set objshape = Selection
        Selection.ShapeRange.TextFrame.MarginLeft = 0#
        Selection.ShapeRange.TextFrame.MarginRight = 0#
        Selection.ShapeRange.TextFrame.MarginTop = 0#
        Selection.ShapeRange.TextFrame.MarginBottom = 0#
        Selection.ShapeRange.Fill.Transparency = 1
        Selection.ShapeRange.Line.Transparency = 0#
        'Format the shape
        objshape.Characters.Text = intCounter
        With objshape.Characters(Start:=1, Length:=Len(intCounter)).Font
            .Name = "Arial"
            .FontStyle = "Regular"
            .Size = 8
            .ColorIndex = 3
        End With
        'increase shape size for number of digits
        With objshape.ShapeRange
        objshape.Characters.Text = intCounter
    'Added (objshape.Characters.Text = intCounter)Above
            .Line.ForeColor.SchemeColor = 10
    'Added (.LockAspectRatio = msoFalse)Below
            '.LockAspectRatio = msoTrue
            .LockAspectRatio = msoFalse
            '.Height = 15.25
            If intCounter < 10 Then .Width = 12.5
            If intCounter >= 10 And intCounter < 100 Then .Width = 16.5
            If intCounter >= 100 And intCounter < 1000 Then .Width = 21.25
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Width = 26.25)Above
            If intCounter >= 1000 Then .Width = 26.25
            If intCounter < 10 Then .Height = 12.5
            If intCounter >= 10 And intCounter < 100 Then .Height = 12.5
            If intCounter >= 100 And intCounter < 1000 Then .Height = 12.5
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Height = 15.25)Above
            If intCounter >= 1000 Then .Height = 12.5
        End With
    Selection.HorizontalAlignment = xlCenter
        'increment shape number and store in text box
        intCounter = intCounter + 1
        ActiveSheet.TextBox1.Text = intCounter
    End Sub
    --------------------------------------------------------------------------------------------------------
    
    Sub CreateLabel5()
    Dim objshape As Object
        'Retrieve and set starting label
        SetStartingLabelNbr
        
        'Create new shape
        ActiveSheet.Shapes.AddShape(msoShapeOval, 305, 3#, 25.5, 25.5).Select
        Set objshape = Selection
        Selection.ShapeRange.TextFrame.MarginLeft = 0#
        Selection.ShapeRange.TextFrame.MarginRight = 0#
        Selection.ShapeRange.TextFrame.MarginTop = 0#
        Selection.ShapeRange.TextFrame.MarginBottom = 0#
        Selection.ShapeRange.Fill.Transparency = 1
        Selection.ShapeRange.Line.Transparency = 0#
        'Format the shape
        objshape.Characters.Text = intCounter
        With objshape.Characters(Start:=1, Length:=Len(intCounter)).Font
            .Name = "Arial"
            .FontStyle = "Regular"
            .Size = 5
            .ColorIndex = 3
        End With
        'increase shape size for number of digits
        With objshape.ShapeRange
        objshape.Characters.Text = intCounter
    'Added (objshape.Characters.Text = intCounter)Above
            .Line.ForeColor.SchemeColor = 10
    'Added (.LockAspectRatio = msoFalse)Below
            '.LockAspectRatio = msoTrue
            .LockAspectRatio = msoFalse
            '.Height = 15.25
            If intCounter < 10 Then .Width = 9.5
            If intCounter >= 10 And intCounter < 100 Then .Width = 12.5
            If intCounter >= 100 And intCounter < 1000 Then .Width = 13.25
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Width = 26.25)Above
            If intCounter >= 1000 Then .Width = 18.25
            If intCounter < 10 Then .Height = 9.5
            If intCounter >= 10 And intCounter < 100 Then .Height = 9.5
            If intCounter >= 100 And intCounter < 1000 Then .Height = 9.5
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Height = 15.25)Above
            If intCounter >= 1000 Then .Height = 9.5
        End With
    Selection.HorizontalAlignment = xlCenter
        'increment shape number and store in text box
        intCounter = intCounter + 1
        ActiveSheet.TextBox1.Text = intCounter
    End Sub
    
    
Reply
  • Here is the VBA Code for Module1
    Option Base 1
    Dim intCounter As Integer
    --------------------------------------------------------------------------------------
    Sub CreateLabel10()
    Dim objshape As Object
        'Retrieve and set starting label
        SetStartingLabelNbr
        
        'Create new shape
        ActiveSheet.Shapes.AddShape(msoShapeOval, 305, 3#, 25.5, 25.5).Select
        Set objshape = Selection
        Selection.ShapeRange.TextFrame.MarginLeft = 0#
        Selection.ShapeRange.TextFrame.MarginRight = 0#
        Selection.ShapeRange.TextFrame.MarginTop = 0#
        Selection.ShapeRange.TextFrame.MarginBottom = 0#
        Selection.ShapeRange.Fill.Transparency = 1
        Selection.ShapeRange.Line.Transparency = 0#
        'Format the shape
        objshape.Characters.Text = intCounter
        With objshape.Characters(Start:=1, Length:=Len(intCounter)).Font
            .Name = "Arial"
            .FontStyle = "Regular"
            .Size = 10
            .ColorIndex = 3
        End With
        'increase shape size for number of digits
        With objshape.ShapeRange
        objshape.Characters.Text = intCounter
    'Added (objshape.Characters.Text = intCounter)Above
            .Line.ForeColor.SchemeColor = 10
    'Added (.LockAspectRatio = msoFalse)Below
            '.LockAspectRatio = msoTrue
            .LockAspectRatio = msoFalse
            '.Height = 15.25
            If intCounter < 10 Then .Width = 15.5
            If intCounter >= 10 And intCounter < 100 Then .Width = 21.5
            If intCounter >= 100 And intCounter < 1000 Then .Width = 25.25
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Width = 26.25)Above
            If intCounter >= 1000 Then .Width = 36.25
            If intCounter < 10 Then .Height = 15.5
            If intCounter >= 10 And intCounter < 100 Then .Height = 15.5
            If intCounter >= 100 And intCounter < 1000 Then .Height = 15.5
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Height = 15.25)Above
            If intCounter >= 1000 Then .Height = 15.5
        End With
    Selection.HorizontalAlignment = xlCenter
        'increment shape number and store in text box
        intCounter = intCounter + 1
        ActiveSheet.TextBox1.Text = intCounter
    End Sub
    --------------------------------------------------------------------------------------------
    
    Sub CreateLabel12()
    Dim objshape As Object
        'Retrieve and set starting label
        SetStartingLabelNbr
        
        'Create new shape
        ActiveSheet.Shapes.AddShape(msoShapeOval, 305, 3#, 25.5, 25.5).Select
        Set objshape = Selection
        Selection.ShapeRange.TextFrame.MarginLeft = 0#
        Selection.ShapeRange.TextFrame.MarginRight = 0#
        Selection.ShapeRange.TextFrame.MarginTop = 0#
        Selection.ShapeRange.TextFrame.MarginBottom = 0#
        Selection.ShapeRange.Fill.Transparency = 1
        Selection.ShapeRange.Line.Transparency = 0#
        'Format the shape
        objshape.Characters.Text = intCounter
        With objshape.Characters(Start:=1, Length:=Len(intCounter)).Font
            .Name = "Arial"
            .FontStyle = "Regular"
            .Size = 12
            .ColorIndex = 3
        End With
        'increase shape size for number of digits
        With objshape.ShapeRange
        objshape.Characters.Text = intCounter
    'Added (objshape.Characters.Text = intCounter)Above
            .Line.ForeColor.SchemeColor = 10
    'Added (.LockAspectRatio = msoFalse)Below
            '.LockAspectRatio = msoTrue
            .LockAspectRatio = msoFalse
            '.Height = 15.25
            If intCounter < 10 Then .Width = 19.5
            If intCounter >= 10 And intCounter < 100 Then .Width = 23.5
            If intCounter >= 100 And intCounter < 1000 Then .Width = 29.25
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Width = 26.25)Above
            If intCounter >= 1000 Then .Width = 40.25
            If intCounter < 10 Then .Height = 19.5
            If intCounter >= 10 And intCounter < 100 Then .Height = 19.5
            If intCounter >= 100 And intCounter < 1000 Then .Height = 19.5
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Height = 15.25)Above
            If intCounter >= 1000 Then .Height = 19.5
        End With
    Selection.HorizontalAlignment = xlCenter
        'increment shape number and store in text box
        intCounter = intCounter + 1
        ActiveSheet.TextBox1.Text = intCounter
    End Sub
    -----------------------------------------------------------------------------------------------------------------------------
    
    Sub CreateLabel8()
    Dim objshape As Object
        'Retrieve and set starting label
        SetStartingLabelNbr
        
        'Create new shape
        ActiveSheet.Shapes.AddShape(msoShapeOval, 305, 3#, 25.5, 25.5).Select
        Set objshape = Selection
        Selection.ShapeRange.TextFrame.MarginLeft = 0#
        Selection.ShapeRange.TextFrame.MarginRight = 0#
        Selection.ShapeRange.TextFrame.MarginTop = 0#
        Selection.ShapeRange.TextFrame.MarginBottom = 0#
        Selection.ShapeRange.Fill.Transparency = 1
        Selection.ShapeRange.Line.Transparency = 0#
        'Format the shape
        objshape.Characters.Text = intCounter
        With objshape.Characters(Start:=1, Length:=Len(intCounter)).Font
            .Name = "Arial"
            .FontStyle = "Regular"
            .Size = 8
            .ColorIndex = 3
        End With
        'increase shape size for number of digits
        With objshape.ShapeRange
        objshape.Characters.Text = intCounter
    'Added (objshape.Characters.Text = intCounter)Above
            .Line.ForeColor.SchemeColor = 10
    'Added (.LockAspectRatio = msoFalse)Below
            '.LockAspectRatio = msoTrue
            .LockAspectRatio = msoFalse
            '.Height = 15.25
            If intCounter < 10 Then .Width = 12.5
            If intCounter >= 10 And intCounter < 100 Then .Width = 16.5
            If intCounter >= 100 And intCounter < 1000 Then .Width = 21.25
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Width = 26.25)Above
            If intCounter >= 1000 Then .Width = 26.25
            If intCounter < 10 Then .Height = 12.5
            If intCounter >= 10 And intCounter < 100 Then .Height = 12.5
            If intCounter >= 100 And intCounter < 1000 Then .Height = 12.5
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Height = 15.25)Above
            If intCounter >= 1000 Then .Height = 12.5
        End With
    Selection.HorizontalAlignment = xlCenter
        'increment shape number and store in text box
        intCounter = intCounter + 1
        ActiveSheet.TextBox1.Text = intCounter
    End Sub
    --------------------------------------------------------------------------------------------------------
    
    Sub CreateLabel5()
    Dim objshape As Object
        'Retrieve and set starting label
        SetStartingLabelNbr
        
        'Create new shape
        ActiveSheet.Shapes.AddShape(msoShapeOval, 305, 3#, 25.5, 25.5).Select
        Set objshape = Selection
        Selection.ShapeRange.TextFrame.MarginLeft = 0#
        Selection.ShapeRange.TextFrame.MarginRight = 0#
        Selection.ShapeRange.TextFrame.MarginTop = 0#
        Selection.ShapeRange.TextFrame.MarginBottom = 0#
        Selection.ShapeRange.Fill.Transparency = 1
        Selection.ShapeRange.Line.Transparency = 0#
        'Format the shape
        objshape.Characters.Text = intCounter
        With objshape.Characters(Start:=1, Length:=Len(intCounter)).Font
            .Name = "Arial"
            .FontStyle = "Regular"
            .Size = 5
            .ColorIndex = 3
        End With
        'increase shape size for number of digits
        With objshape.ShapeRange
        objshape.Characters.Text = intCounter
    'Added (objshape.Characters.Text = intCounter)Above
            .Line.ForeColor.SchemeColor = 10
    'Added (.LockAspectRatio = msoFalse)Below
            '.LockAspectRatio = msoTrue
            .LockAspectRatio = msoFalse
            '.Height = 15.25
            If intCounter < 10 Then .Width = 9.5
            If intCounter >= 10 And intCounter < 100 Then .Width = 12.5
            If intCounter >= 100 And intCounter < 1000 Then .Width = 13.25
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Width = 26.25)Above
            If intCounter >= 1000 Then .Width = 18.25
            If intCounter < 10 Then .Height = 9.5
            If intCounter >= 10 And intCounter < 100 Then .Height = 9.5
            If intCounter >= 100 And intCounter < 1000 Then .Height = 9.5
    'Added (If intCounter >= 100 And intCounter < 1000 Then .Height = 15.25)Above
            If intCounter >= 1000 Then .Height = 9.5
        End With
    Selection.HorizontalAlignment = xlCenter
        'increment shape number and store in text box
        intCounter = intCounter + 1
        ActiveSheet.TextBox1.Text = intCounter
    End Sub
    
    
Children
No Data