Sub Macro1()
Range("B5").Select
ActiveCell.FormulaR1C1 = "MACRO1"
Range("B5").Select
End Sub
Sub Macro2()
Range("E5").Select
ActiveCell.FormulaR1C1 = "MACRO2"
Range("E5").Select
End Sub
Sub Macro3()
Range("H5").Select
ActiveCell.FormulaR1C1 = "MACRO3"
Range("H5").Select
End Sub
Sub Macro4()
Range("K5").Select
ActiveCell.FormulaR1C1 = "MACRO4"
Range("K5").Select
End Sub
Sub Macro5()
Range("N5").Select
ActiveCell.FormulaR1C1 = "MACRO5"
Range("N5").Select
End Sub
Sub Macro6() ' Genera i pulsanti
' GENERA PRIMO PULSANTE +++++++++++++++++++++++++++++++
'
ActiveSheet.Shapes.AddShape(msoShapeBevel, 42.75, 69, 56.25, 28.25).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "MACRO1"
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6).ParagraphFormat
.FirstLineIndent = 0
.Alignment = msoAlignLeft
End With
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6).Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
.Fill.ForeColor.TintAndShade = 0
.Fill.ForeColor.Brightness = 0
.Fill.Transparency = 0
.Fill.Solid
.Size = 11
.Name = "+mn-lt"
End With
Selection.ShapeRange.ScaleWidth 1.32, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.9090909091, msoFalse, msoScaleFromTopLeft
Selection.OnAction = "Macro1"
Range("B5").Select
' GENERA SECONDO PULSANTE +++++++++++++++++++++++++++++++
'
ActiveSheet.Shapes.AddShape(msoShapeBevel, 162.75, 69, 56.25, 29.25).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "MACRO2"
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6). _
ParagraphFormat
.FirstLineIndent = 0
.Alignment = msoAlignLeft
End With
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6).Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
.Fill.ForeColor.TintAndShade = 0
.Fill.ForeColor.Brightness = 0
.Fill.Transparency = 0
.Fill.Solid
.Size = 11
.Name = "+mn-lt"
End With
Selection.ShapeRange.ScaleWidth 1.32, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.9090909091, msoFalse, msoScaleFromTopLeft
Selection.OnAction = "Macro2"
Range("E5").Select
' GENERA TERZO PULSANTE +++++++++++++++++++++++++++++++
'
ActiveSheet.Shapes.AddShape(msoShapeBevel, 280, 69, 56.25, 29.25).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "MACRO3"
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6). _
ParagraphFormat
.FirstLineIndent = 0
.Alignment = msoAlignLeft
End With
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6).Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
.Fill.ForeColor.TintAndShade = 0
.Fill.ForeColor.Brightness = 0
.Fill.Transparency = 0
.Fill.Solid
.Size = 11
.Name = "+mn-lt"
End With
Selection.ShapeRange.ScaleWidth 1.32, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.9090909091, msoFalse, msoScaleFromTopLeft
Selection.OnAction = "Macro3"
Range("H5").Select
' GENERA QUARTO PULSANTE +++++++++++++++++++++++++++++++
'
ActiveSheet.Shapes.AddShape(msoShapeBevel, 400, 69, 56.25, 29.25).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "MACRO4"
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6). _
ParagraphFormat
.FirstLineIndent = 0
.Alignment = msoAlignLeft
End With
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6).Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
.Fill.ForeColor.TintAndShade = 0
.Fill.ForeColor.Brightness = 0
.Fill.Transparency = 0
.Fill.Solid
.Size = 11
.Name = "+mn-lt"
End With
Selection.ShapeRange.ScaleWidth 1.32, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.9090909091, msoFalse, msoScaleFromTopLeft
Selection.OnAction = "Macro4"
Range("K5").Select
' GENERA QUINTO PULSANTE +++++++++++++++++++++++++++++++
'
ActiveSheet.Shapes.AddShape(msoShapeBevel, 530, 69, 56.25, 29.25).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "MACRO5"
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6). _
ParagraphFormat
.FirstLineIndent = 0
.Alignment = msoAlignLeft
End With
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6).Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
.Fill.ForeColor.TintAndShade = 0
.Fill.ForeColor.Brightness = 0
.Fill.Transparency = 0
.Fill.Solid
.Size = 11
.Name = "+mn-lt"
End With
Selection.ShapeRange.ScaleWidth 1.32, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.9090909091, msoFalse, msoScaleFromTopLeft
Selection.OnAction = "Macro5"
Range("N5").Select
End Sub
|