Sub a()
ActiveSheet.DrawingObjects("MaForme").Text = Format(Val(Replace(Application.InputBox("Montant :"), ",", ".")), "#,##0.00 €")
End Sub
Sub test()
With ActiveSheet.Shapes("Myshape").OLEFormat.Object
m = InputBox("entrez un texte à afficher dans le shape " & .Name, , .Text)
If m <> "" Then .Text = m
End With
End Sub
Sub test()
With ActiveSheet.Shapes("Myshape").OLEFormat.Object
m = InputBox("entrez un texte à afficher dans le shape " & .Name, , .Text)
If m <> "" Then .Text = m & " ans"
End With
End Sub
Sub a()
ActiveSheet.DrawingObjects("MaForme").Text = Val(Application.InputBox("Age :")) & " ans"
End Sub
Sub a()
ActiveSheet.DrawingObjects("MaForme").Text = Format(Val(Replace(Application.InputBox("Montant :"), ",", ".")), "#,##0.00 €")
End Sub
Aucun souci, la formule retenue mettra toujours 0.00€ au minimum sans indiquer ce qui existait ...Re,
un grand merci pour votre aide si précieuse, les 2 solutions fonctionnent très bien, je vais opter pour la soluce de Job75 qui un peu plus courte tout simplement
bonne soirée
Bonjour Fan55,Aucun souci, la formule retenue mettra toujours 0.00€ au minimum sans indiquer ce qui existait ...![]()
Remplacez Application.InputBox par InputBoxUne précision, la valeur saisie dans l'inputbox est saisie dans S6, mais lorsque je clique sur annuler "faux" est saisi dans S6, Il y a t'il la possibilité de laisser la cellule S6 vide si je clique sur annuler ?
Sub test()
Dim X
With ActiveSheet.DrawingObjects("mashape")
X = InputBox("entrez un Montant:")
[s6] = X
.Text = Format(Val(Replace(X, ",", ".")), "#,##0.00 €")
'ARRANGEMENT DU TEXTE
'.Font.Name = "calibri" 'Police de caractère
'.Font.Color = RGB(255, 0, 0) 'couleur du texte
'.Font.Size = 11 'taille du texte
'.Font.Bold = True 'texte en gras (ou pas)
'.Font.Italic = True 'texte en italic(ou pas)
'.HorizontalAlignment = xlCenter 'alignement horizontal du texte (xlLeft ou XlRight ou Xl Center)
'.VerticalAlignment = xlCenter 'alignement vertical du texte (XlTop ou XlCenter ou XlBottom)
'ARRANGEMENT DE LA SHAPE
'.Interior.Color = vbYellow 'couleur du fond de la shape
'.ShapeRange.Line.ForeColor.RGB = vbRed 'couleur du contour de la shape
'.ShapeRange.Line.Weight = 10 'épaisseur du contour de la shape
'.ShapeRange.Adjustments.Item(1) = 0.1 'angle des coins arrondi de la shape
End With
End Sub