1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
| Private Sub CommandButton1_Click()
Sheets.Add
ActiveCell.FormulaR1C1 = "Nom du Portefeuille"
Range("B3").Select
ActiveCell.FormulaR1C1 = "Valeurs"
Range("C3").Select
ActiveCell.FormulaR1C1 = "Quantité"
Range("D3").Select
ActiveCell.FormulaR1C1 = "Prix de revient"
Range("E3").Select
ActiveCell.FormulaR1C1 = "Capital investi"
Range("F3").Select
ActiveCell.FormulaR1C1 = "Cours actualisé"
Range("G3").Select
ActiveCell.FormulaR1C1 = "Capital"
Range("H3").Select
ActiveCell.FormulaR1C1 = "Performance"
Range("A8").Select
ActiveCell.FormulaR1C1 = "Performance Totale"
Range("C4:H7").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("A8").Select
Selection.ClearContents
Range("A9").Select
ActiveCell.FormulaR1C1 = "Performance totale"
Range("C4:H8").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("B4:B8").Select
Selection.Font.Bold = True
With Selection.Font
.Name = "Arial"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("A1:H9").Select
Selection.AutoFormat Format:=xlRangeAutoFormatClassic2, Number:=True, Font _
:=True, Alignment:=True, Border:=True, Pattern:=True, Width:=True
ActiveSheet.Range("B4") = zvaleur1.Value
ActiveSheet.Range("B5") = zvaleur2.Value
ActiveSheet.Range("B6") = zvaleur3.Value
ActiveSheet.Range("B7") = zvaleur4.Value
ActiveSheet.Range("B8") = zvaleur5.Value
ActiveSheet.Range("C4") = zquantite1.Value
ActiveSheet.Range("C5") = zquantite2.Value
ActiveSheet.Range("C6") = zquantite3.Value
ActiveSheet.Range("C7") = zquantite4.Value
ActiveSheet.Range("C8") = zquantite5.Value
ActiveSheet.Range("D4") = pr1.Value
ActiveSheet.Range("D5") = pr2.Value
ActiveSheet.Range("D6") = pr3.Value
ActiveSheet.Range("D7") = pr4.Value
ActiveSheet.Range("D8") = pr5.Value
ActiveSheet.Range("E4") = ci1.Value
ActiveSheet.Range("E5") = ci2.Value
ActiveSheet.Range("E6") = ci3.Value
ActiveSheet.Range("E7") = ci4.Value
ActiveSheet.Range("E8") = ci5.Value
ActiveSheet.Range("F4") = TextBox10.Value
ActiveSheet.Range("F5") = cours2.Value
ActiveSheet.Range("F6") = cours3.Value
ActiveSheet.Range("F7") = cours4.Value
ActiveSheet.Range("F8") = cours5.Value
ActiveSheet.Range("G4") = ca1.Value
ActiveSheet.Range("G5") = ca2.Value
ActiveSheet.Range("G6") = ca3.Value
ActiveSheet.Range("G7") = ca4.Value
ActiveSheet.Range("G8") = ca5.Value
ActiveSheet.Range("H4") = TextBox8.Value
ActiveSheet.Range("H5") = perf2.Value
ActiveSheet.Range("H6") = perf3.Value
ActiveSheet.Range("H7") = perf4.Value
ActiveSheet.Range("H8") = perf5.Value
ActiveSheet.Range("A2") = nomport.Value
Range("B4:B8").Select
Selection.Font.Bold = True
Range("C4:H8").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("H9").Select
Selection.Font.Bold = True
Range("A9").Select
Selection.Font.Bold = True
Range("A1:H9").Select
Selection.Columns.AutoFit
ActiveSheet.Select
ActiveSheet.Name = Range("A2").Value |
Partager