Souci avec le format monetaire

Résolu
chris09300 Messages postés 140 Date d'inscription lundi 9 juin 2008 Statut Membre Dernière intervention 18 avril 2012 - 20 nov. 2011 à 17:58
chris09300 Messages postés 140 Date d'inscription lundi 9 juin 2008 Statut Membre Dernière intervention 18 avril 2012 - 20 nov. 2011 à 18:29
Bonsoir
j'ai un petit souci avec le format monetaire.
dans mon userform je rentre une valeur numerique, et lors de la validation sur ma feuille excel je n'arrive pas a avoir :exemple 100,00€
pourtant dans la feuille excel j'applique un format monetaire.
cris


Private Sub userform12_Click()
Sheets("Donnees").Select
UserForm12.Show
End Sub
Private Sub Userform11_Click()
UserForm11.Show
Application.DisplayFullScreen = True
End Sub
Private Sub ComboBox1_Change()
[B2] = UserForm11.ComboBox1
End Sub
Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)

End Sub

Private Sub UserForm_Initialize()
Me.DTPicker1.Value = Date

With Me
.StartUpPosition = 3
.Width = Application.Width
.Height = Application.Height
.Left = 0
.Top = 0
End With

End Sub
Private Sub TextBox1_Change()
[C2] = UserForm11.TextBox1

End Sub
Private Sub TextBox2_Change()
[E2] = UserForm11.TextBox2
End Sub
Private Sub TextBox3_Change()
[D2] = UserForm11.TextBox3
End Sub
Private Sub Bt_Valider_Click()
Application.ScreenUpdating = False
    [A2] = DTPicker1.Value
 
Rows("2:2").Select
    Selection.Insert Shift:=xlDown
    Selection.RowHeight = 16.2

Unload UserForm11
Range("A1").Select
Application.ScreenUpdating = True
End Sub
Private Sub CommandButton1_Click()
Unload UserForm11
End Sub

2 réponses

chris09300 Messages postés 140 Date d'inscription lundi 9 juin 2008 Statut Membre Dernière intervention 18 avril 2012 1
20 nov. 2011 à 18:29
encore merci.
cris
3
ucfoutu Messages postés 18038 Date d'inscription lundi 7 décembre 2009 Statut Modérateur Dernière intervention 11 avril 2018 211
20 nov. 2011 à 18:12
Bonjour,

écrire (exemple) :
[C2] = UserForm11.TextBox1

sans préciser la propriété utilisée, fait que VBA choisit celle par défaut (qui se trouve être la propriété Text !)
Il n'est d'ailleurs jamais astucieux de ne pas préciser la propriété d'un contôle, lorsqu'on l'utilise.
Ecris donc :
[C2] = UserForm11.TextBox1.Value

de sorte à envoyer un numérique vers ta cellule.
Pareil pour toutes tes textboxes
____________________
Réponse exacte ? => "REPONSE ACCEPTEE" pour faciliter les recherches d'autres forumeurs.
Pas d'aide en ligne installée ? ==> ne comptez pas sur moi pour simplement vous dire ce qu'elle contient
0
Rejoignez-nous