1 textbox pour 2 feuilles

reinruof77

XLDnaute Occasionnel
bonjour le forum

je suis sur un probleme depuis deux jour et je ne m'en sort pas.
En effet j'ai une liste du personnel a faire avec deux feuilles 1 "fiche agent" qui sera a envoyer au rh et une autre feuille "syntese" pour avoir un suivi
j'ai créer un userform et des textbox que j'arive a envoyer sur la feuille "fiche agent" mais je ne parviens pas a ce que la textbox renvoi les donnés sur l'autre feuille.

Pouvez vous m'aider?
merci
 

reinruof77

XLDnaute Occasionnel
Re : 1 textbox pour 2 feuilles

bonjour robert
en fait il sagit de plusieurs textbox de l'userform1
voici le code que j'ai créer pour la fiche agent
( je suis debutant en vba )
Private Sub CommandButton3_Click()
Sheets("Fiche Agent").Range("B5") = TextBox2
Sheets("Fiche Agent").Range("B6") = TextBox3
Sheets("Fiche Agent").Range("B8") = TextBox4
Sheets("Fiche Agent").Range("B9") = TextBox5
Sheets("Fiche Agent").Range("B10") = TextBox6
Sheets("Fiche Agent").Range("B12") = TextBox7
Sheets("Fiche Agent").Range("h5") = TextBox8
Sheets("Fiche Agent").Range("h7") = ComboBox1
Sheets("Fiche Agent").Range("h8") = ComboBox2
Sheets("Fiche Agent").Range("h9") = ComboBox3
Sheets("Fiche Agent").Range("h10") = TextBox9
Sheets("Fiche Agent").Range("h12") = TextBox10
Sheets("Fiche Agent").Range("h13") = TextBox11
Dim strNom As Variant

strNom = Application.GetSaveAsFilename(ActiveSheet.Name, "Fichier Excel (*.xls),*.xls")

If strNom <> False Then
ActiveSheet.Copy
ActiveWorkbook.SaveAs strNom
ActiveWorkbook.Close
End If
Unload UserForm1
End Sub

Merci de votre aide
 

Robert

XLDnaute Barbatruc
Repose en paix
Re : 1 textbox pour 2 feuilles

Bonjour Reinrouf, bonjour le forum,

Peut-être comme ça :
Code:
With Sheets("Fiche Agent")
    .Range("B5") = TextBox2
    .Range("B6") = TextBox3
    .Range("B8") = TextBox4
    .Range("B9") = TextBox5
    .Range("B10") = TextBox6
    .Range("B12") = TextBox7
    .Range("h5") = TextBox8
    .Range("h7") = ComboBox1
    .Range("h8") = ComboBox2
    .Range("h9") = ComboBox3
    .Range("h10") = TextBox9
    .Range("h12") = TextBox10
    .Range("h13") = TextBox11
End With
With Sheets("Synthèse")
    .Range("B5") = TextBox2 'à adapter
    .Range("B6") = TextBox3 'à adapter
    .Range("B8") = TextBox4 'à adapter
    .Range("B9") = TextBox5 'à adapter
    .Range("B10") = TextBox6 'à adapter
    .Range("B12") = TextBox7 'à adapter
    .Range("h5") = TextBox8 'à adapter
    .Range("h7") = ComboBox1 'à adapter
    .Range("h8") = ComboBox2 'à adapter
    .Range("h9") = ComboBox3 'à adapter
    .Range("h10") = TextBox9 'à adapter
    .Range("h12") = TextBox10 'à adapter
    .Range("h13") = TextBox11 'à adapter
End With
'.... la suite du code...
 

reinruof77

XLDnaute Occasionnel
Re : 1 textbox pour 2 feuilles

bonjour robert et le forum

désolé mais ce n'est pas ce que je recherche .:eek:

Sur ma feuille ("Fiche Agent") mes textbox arrive bien mais dans la feuille ("Synthèse") c'est pour un suivi je joint mon fichier pour mieux me faire comprendre.
le fichier("Synthèse")est une liste des ("Fiche Agent").

merci
 

Robert

XLDnaute Barbatruc
Repose en paix
Re : 1 textbox pour 2 feuilles

Bonjour Fournier, bonjour le forum,

Pour les fichier Excel 2007 c'est pas le bon forum... Je ne comprends pas ta question et ne peut ouvrir ton fichier... Difficile donc de t'aider.
 

Discussions similaires

Membres actuellement en ligne

Statistiques des forums

Discussions
312 084
Messages
2 085 194
Membres
102 811
dernier inscrit
caroline29260