Hi again Ken,
worked just fine, this is my final code:
Sub Add_Command_Buttons()
Dim cl As Range, myCmdObj As OLEObject, i, LineNum As Integer
Dim TargetSheet As Worksheet, TargetBook As Workbook
Application.ScreenUpdating = False
Set TargetSheet = ActiveSheet
Set TargetBook = ActiveWorkbook
For Each cl In [A14,A20,A25]
i = i + 1
Set myCmdObj = TargetSheet.OLEObjects.Add(ClassType:="Forms.CommandButton.1", _
Left:=cl.Left + 1, Top:=cl.Top + 1, Width:=202.5, Height:=32.25)
With myCmdObj
.Name = Choose(i, "cmdReexibirNC", "cmdSubtotalNC", "cmdResumo")
.Placement = xlMove
.PrintObject = False
With .Object
.Caption = Choose(i, "Reexibe todas colunas e remove subtotais", _
"Gera subtotais e oculta colunas", _
"Analisa outras opera??es")
.Enabled = True
.Font.Size = 10
.Font.Bold = True
.TakeFocusOnClick = False
.WordWrap = True
End With
End With
Next
Set myCmdObj = Nothing
With TargetBook.VBProject.VBComponents(TargetSheet.CodeName).CodeModule
LineNum = .CountOfLines + 1
.InsertLines LineNum, "Private Sub cmdReexibirNC_Click()"
.InsertLines LineNum + 1, vbNewLine
.InsertLines LineNum + 2, vbTab & "Reexibe_NC"
.InsertLines LineNum + 3, vbNewLine
.InsertLines LineNum + 4, "End Sub"
End With
With TargetBook.VBProject.VBComponents(TargetSheet.CodeName).CodeModule
LineNum = .CountOfLines + 1
.InsertLines LineNum, "Private Sub cmdSubtotalNC_Click()"
.InsertLines LineNum + 1, vbNewLine
.InsertLines LineNum + 2, vbTab & "Subtotal_NC"
.InsertLines LineNum + 3, vbNewLine
.InsertLines LineNum + 4, "End Sub"
End With
With TargetBook.VBProject.VBComponents(TargetSheet.CodeName).CodeModule
LineNum = .CountOfLines + 1
.InsertLines LineNum, "Private Sub cmdResumo_Click()"
.InsertLines LineNum + 1, vbNewLine
.InsertLines LineNum + 2, vbTab & "Analisa"
.InsertLines LineNum + 3, vbNewLine
.InsertLines LineNum + 4, "End Sub"
End With
Application.ScreenUpdating = True
End Sub