Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Sauvegarder un fichier

6 réponses
Avatar
TITUS
Bonjour

1 -
J'ai un fichier avec une userform ou sur le bouton fin j'ai le code suivant.

Private Sub b_fin_Click()
Unload Me
End Sub

Je voudrais qu'en cliquant sur ce bouton, la sauvegarde du classeur se fasse
en arrière Plan sans que l'utilisateur le voit. Est-ce possible.

2 -
Ce USERFORM alimente un tableau EXCEL 2003.
Je souhaiterais que les enregistrements entrés par ce biais se mettent au
début du tableau et non à la suite comme d'ahbitude. Est-ce possible ?

Si vous avez un esprit éclairé merci de tenter d'éclairer le mien

Cordialement

--
TITUS

6 réponses

Avatar
lSteph
Bonjour,

1 -


Private Sub b_fin_Click()
With application
.screenupdatingúlse
.displayalertsúlse
Activeworkbook.save
end with
Unload Me
End Sub

2 -
sauf précisions sur le contenu de ce Userform type et nombre de

contrôles Supposons dans la feuille Date Nom Prénom Montant et dans le
frm
3 TextBox

Private Sub b_fin_Click()
Dim i As Integer
For i = 1 To 3
If Len(Me.Controls("TextBox" & i)) = 0 Then
Me.Controls("TextBox" & i).SetFocus
Exit Sub
End If
Next
ActiveSheet.Rows(2).Insert
[A2] = Format(Now, "dd/mm/yyyy")
[B2] = TextBox1
[C2] = TextBox2
[D2] = CSng(TextBox3)
[D2].NumberFormat = "0.00"
With Application
.ScreenUpdating = False
.DisplayAlerts = False
ActiveWorkbook.Save
End With
Unload Me

End Sub


'lSteph


On 31 août, 09:56, TITUS wrote:
Bonjour

1 -
J'ai un fichier avec une userform ou sur le bouton fin j'ai le code suiva nt.

Private Sub b_fin_Click()
Unload Me
End Sub

Je voudrais qu'en cliquant sur ce bouton, la sauvegarde du classeur se fa sse
en arrière Plan sans que l'utilisateur le voit. Est-ce possible.

2 -
Ce USERFORM alimente un tableau EXCEL 2003.
Je souhaiterais que les enregistrements entrés par ce biais se mettent au
début du tableau et non à la suite comme d'ahbitude. Est-ce possible ?

Si vous avez un esprit éclairé merci de tenter d'éclairer le mien

Cordialement

--
TITUS


Avatar
TITUS
..screenupdatingúlse
..displayalertsúlse
Ne semblent pas aller. Les lignes sont en rouges dans le code et
l'enregistrement du classeur ne se fait pas du tout
--
TITUS



Bonjour,

1 -


Private Sub b_fin_Click()
With application
..screenupdatingúlse
..displayalertsúlse
Activeworkbook.save
end with
Unload Me
End Sub

2 -
sauf précisions sur le contenu de ce Userform type et nombre de

contrôles Supposons dans la feuille Date Nom Prénom Montant et dans le
frm
3 TextBox

Private Sub b_fin_Click()
Dim i As Integer
For i = 1 To 3
If Len(Me.Controls("TextBox" & i)) = 0 Then
Me.Controls("TextBox" & i).SetFocus
Exit Sub
End If
Next
ActiveSheet.Rows(2).Insert
[A2] = Format(Now, "dd/mm/yyyy")
[B2] = TextBox1
[C2] = TextBox2
[D2] = CSng(TextBox3)
[D2].NumberFormat = "0.00"
With Application
..ScreenUpdating = False
..DisplayAlerts = False
ActiveWorkbook.Save
End With
Unload Me

End Sub


'lSteph


On 31 août, 09:56, TITUS wrote:
Bonjour

1 -
J'ai un fichier avec une userform ou sur le bouton fin j'ai le code suivant.

Private Sub b_fin_Click()
Unload Me
End Sub

Je voudrais qu'en cliquant sur ce bouton, la sauvegarde du classeur se fasse
en arrière Plan sans que l'utilisateur le voit. Est-ce possible.

2 -
Ce USERFORM alimente un tableau EXCEL 2003.
Je souhaiterais que les enregistrements entrés par ce biais se mettent au
début du tableau et non à la suite comme d'ahbitude. Est-ce possible ?

Si vous avez un esprit éclairé merci de tenter d'éclairer le mien

Cordialement

--
TITUS







Avatar
TITUS
J'espère pour te faciliter la vie, voie le code du classeur.
Merci de ton aide précieuse
Sincèrement
TITUS


Dans la feuille de calcul, voici le code:
Private Sub B_création_simple_Click()
f_création_simple.Show
End Sub

Private Sub b_formulaire_Click()
f_création.Show
End Sub

Private Sub b_modif_Click()
f_modif.Show
End Sub
Private Sub appel_Simple()
F_CréationSimple.Show
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$A$2" And Target.Count = 1 Then
Target = UCase(Target)
End If
End Sub


Dans This Workbook le code est :

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = [A:A] And Target.Count = 1 Then
Target = UCase(Target)
End If
End Sub


Dans le userform le code est :

Sub appel_Simple()
F_CréationSimple.Show
End Sub



Private Sub BUT_Change()

End Sub

Private Sub UserForm_Initialize()
Me.profil.AddItem "TNS"
Me.profil.AddItem "AS"

Me.BUT.AddItem "Commercial"
Me.BUT.AddItem "Entreprises"
Me.BUT.AddItem "Cotisations"
Me.BUT.AddItem "Prestations"

Me.Motif.AddItem "Administratif"
Me.Motif.AddItem "Carte Européenne"
Me.Motif.AddItem "Carte Vitale"
Me.Motif.AddItem "CMU"
Me.Motif.AddItem "Contrat"
Me.Motif.AddItem "Etude Santé"
Me.Motif.AddItem "Etude Prévoyance"
Me.Motif.AddItem "Devis Dentaires/Optiques"
Me.Motif.AddItem "Feuilles de soins"
Me.Motif.AddItem "Réclamations"
Me.Motif.AddItem "Règlement"
Me.Motif.AddItem "Renvoi Conseiller Commercial"
Me.Motif.AddItem "Renvoi Intervenant"
Me.Motif.AddItem "Résiliation"
Me.Motif.AddItem "Cas particuliers"





End Sub
Private Sub b_validation_Click()
'--- Positionnement dans la base
[A65000].End(xlUp).Offset(1, 0).Select
'--- Transfert Formulaire dans BD
ActiveCell.Value = Application.Proper(Me.nom)
ActiveCell.Offset(0, 1).Value = Me.Prenom
ActiveCell.Offset(0, 2).Value = Me.age
ActiveCell.Offset(0, 5).Value = Me.BUT
ActiveCell.Offset(0, 4).Value = Me.profil
ActiveCell.Offset(0, 6).Value = Me.Motif
ActiveCell.Offset(0, 7).Value = Me.Commentaire
ActiveCell.Offset(0, 8).Value = Now
ActiveCell.Offset(0, 9).Value = Environ("username")
End Sub
Private Sub b_fin_Click()
With Application
..screenupdatingúlse
..displayalertsúlse
ActiveWorkbook.Save
End With
Unload Me
End Sub


Dans Module 1 le code est :
Sub appel_Simple()
F_CréationSimple.Show
End Sub
Sub afficheForm()
F_codePostal.Show
End Sub

--
TITUS



Bonjour,

1 -


Private Sub b_fin_Click()
With application
..screenupdatingúlse
..displayalertsúlse
Activeworkbook.save
end with
Unload Me
End Sub

2 -
sauf précisions sur le contenu de ce Userform type et nombre de

contrôles Supposons dans la feuille Date Nom Prénom Montant et dans le
frm
3 TextBox

Private Sub b_fin_Click()
Dim i As Integer
For i = 1 To 3
If Len(Me.Controls("TextBox" & i)) = 0 Then
Me.Controls("TextBox" & i).SetFocus
Exit Sub
End If
Next
ActiveSheet.Rows(2).Insert
[A2] = Format(Now, "dd/mm/yyyy")
[B2] = TextBox1
[C2] = TextBox2
[D2] = CSng(TextBox3)
[D2].NumberFormat = "0.00"
With Application
..ScreenUpdating = False
..DisplayAlerts = False
ActiveWorkbook.Save
End With
Unload Me

End Sub


'lSteph


On 31 août, 09:56, TITUS wrote:
Bonjour

1 -
J'ai un fichier avec une userform ou sur le bouton fin j'ai le code suivant.

Private Sub b_fin_Click()
Unload Me
End Sub

Je voudrais qu'en cliquant sur ce bouton, la sauvegarde du classeur se fasse
en arrière Plan sans que l'utilisateur le voit. Est-ce possible.

2 -
Ce USERFORM alimente un tableau EXCEL 2003.
Je souhaiterais que les enregistrements entrés par ce biais se mettent au
début du tableau et non à la suite comme d'ahbitude. Est-ce possible ?

Si vous avez un esprit éclairé merci de tenter d'éclairer le mien

Cordialement

--
TITUS







Avatar
lSteph
;o)
Mauvais tour de l'interface utilisée pour la connection au forum
je n'ai mis qu'un seul .point devant et non ..deux .screenupdating
et non ..screenupdating
cela arrive en début de ligne de même que cela sucre parfois le signe
égal contre un espace!


On 31 août, 11:26, TITUS wrote:
..screenupdatingúlse
..displayalertsúlse
Ne semblent pas aller. Les lignes sont en rouges dans le code et
l'enregistrement du classeur ne se fait pas du tout
--
TITUS


Bonjour,

1 -


Private Sub b_fin_Click()
With application
..screenupdatingúlse
..displayalertsúlse
Activeworkbook.save
end with
Unload Me
End Sub

2 -
sauf précisions sur le contenu de ce Userform type et nombre de

contrôles Supposons dans la feuille Date Nom Prénom Montant et dans le
frm
3 TextBox

Private Sub b_fin_Click()
Dim i As Integer
For i = 1 To 3
If Len(Me.Controls("TextBox" & i)) = 0 Then
Me.Controls("TextBox" & i).SetFocus
Exit Sub
End If
Next
ActiveSheet.Rows(2).Insert
[A2] = Format(Now, "dd/mm/yyyy")
[B2] = TextBox1
[C2] = TextBox2
[D2] = CSng(TextBox3)
[D2].NumberFormat = "0.00"
With Application
..ScreenUpdating = False
..DisplayAlerts = False
ActiveWorkbook.Save
End With
Unload Me

End Sub

'lSteph

On 31 août, 09:56, TITUS wrote:
Bonjour

1 -
J'ai un fichier avec une userform ou sur le bouton fin j'ai le code s uivant.

Private Sub b_fin_Click()
Unload Me
End Sub

Je voudrais qu'en cliquant sur ce bouton, la sauvegarde du classeur s e fasse
en arrière Plan sans que l'utilisateur le voit. Est-ce possible.

2 -
Ce USERFORM alimente un tableau EXCEL 2003.
Je souhaiterais que les enregistrements entrés par ce biais se mett ent au
début du tableau et non à la suite comme d'ahbitude. Est-ce possi ble ?

Si vous avez un esprit éclairé merci de tenter d'éclairer le mi en

Cordialement

--
TITUS






Avatar
lSteph
...
donc une fois le point en trop enlevé cela devrait aller.
pour le reste il faut modifier le point d'entrée,
Private Sub b_validation_Click()
'--- Positionnement dans la base
[A65000].End(xlUp).Offset(1, 0).Select
'--- Transfert Formulaire dans BD
ActiveCell.Value = Application.Proper(Me.nom)
ActiveCell.Offset(0, 1).Value = Me.Prenom
dépend où commencent tes titres

supposons en
[A3] on va donc insérer les données en a4


Private Sub b_validation_Click()
'ici ta proc de contrôle de validation le cas échéant

Application.enableeventsúlse
'(attention si réaction worksheet_change voulu ou non)
ActiveSheet.Rows(4).Insert
'--- Transfert Formulaire dans BD

[A4]= Application.Proper(Me.nom)
[A4].Offset(0, 1).Value = Me.Prenom
'...etc
'...
Application.enableevents=true
End sub
Cordialement.

lSteph


On 31 août, 11:30, TITUS wrote:
J'espère pour te faciliter la vie, voie le code du classeur.
Merci de ton aide précieuse
Sincèrement
TITUS

Dans la feuille de calcul, voici le code:
Private Sub B_création_simple_Click()
f_création_simple.Show
End Sub

Private Sub b_formulaire_Click()
f_création.Show
End Sub

Private Sub b_modif_Click()
f_modif.Show
End Sub
Private Sub appel_Simple()
F_CréationSimple.Show
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$A$2" And Target.Count = 1 Then
Target = UCase(Target)
End If
End Sub

Dans This Workbook le code est :

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = [A:A] And Target.Count = 1 Then
Target = UCase(Target)
End If
End Sub

Dans le userform le code est :

Sub appel_Simple()
F_CréationSimple.Show
End Sub

Private Sub BUT_Change()

End Sub

Private Sub UserForm_Initialize()
Me.profil.AddItem "TNS"
Me.profil.AddItem "AS"

Me.BUT.AddItem "Commercial"
Me.BUT.AddItem "Entreprises"
Me.BUT.AddItem "Cotisations"
Me.BUT.AddItem "Prestations"

Me.Motif.AddItem "Administratif"
Me.Motif.AddItem "Carte Européenne"
Me.Motif.AddItem "Carte Vitale"
Me.Motif.AddItem "CMU"
Me.Motif.AddItem "Contrat"
Me.Motif.AddItem "Etude Santé"
Me.Motif.AddItem "Etude Prévoyance"
Me.Motif.AddItem "Devis Dentaires/Optiques"
Me.Motif.AddItem "Feuilles de soins"
Me.Motif.AddItem "Réclamations"
Me.Motif.AddItem "Règlement"
Me.Motif.AddItem "Renvoi Conseiller Commercial"
Me.Motif.AddItem "Renvoi Intervenant"
Me.Motif.AddItem "Résiliation"
Me.Motif.AddItem "Cas particuliers"

End Sub
Private Sub b_validation_Click()
'--- Positionnement dans la base
[A65000].End(xlUp).Offset(1, 0).Select
'--- Transfert Formulaire dans BD
ActiveCell.Value = Application.Proper(Me.nom)
ActiveCell.Offset(0, 1).Value = Me.Prenom
ActiveCell.Offset(0, 2).Value = Me.age
ActiveCell.Offset(0, 5).Value = Me.BUT
ActiveCell.Offset(0, 4).Value = Me.profil
ActiveCell.Offset(0, 6).Value = Me.Motif
ActiveCell.Offset(0, 7).Value = Me.Commentaire
ActiveCell.Offset(0, 8).Value = Now
ActiveCell.Offset(0, 9).Value = Environ("username")
End Sub
Private Sub b_fin_Click()
With Application
..screenupdatingúlse
..displayalertsúlse
ActiveWorkbook.Save
End With
Unload Me
End Sub

Dans Module 1 le code est :
Sub appel_Simple()
F_CréationSimple.Show
End Sub
Sub afficheForm()
F_codePostal.Show
End Sub

--
TITUS


Bonjour,

1 -


Private Sub b_fin_Click()
With application
..screenupdatingúlse
..displayalertsúlse
Activeworkbook.save
end with
Unload Me
End Sub

2 -
sauf précisions sur le contenu de ce Userform type et nombre de

contrôles Supposons dans la feuille Date Nom Prénom Montant et dans le
frm
3 TextBox

Private Sub b_fin_Click()
Dim i As Integer
For i = 1 To 3
If Len(Me.Controls("TextBox" & i)) = 0 Then
Me.Controls("TextBox" & i).SetFocus
Exit Sub
End If
Next
ActiveSheet.Rows(2).Insert
[A2] = Format(Now, "dd/mm/yyyy")
[B2] = TextBox1
[C2] = TextBox2
[D2] = CSng(TextBox3)
[D2].NumberFormat = "0.00"
With Application
..ScreenUpdating = False
..DisplayAlerts = False
ActiveWorkbook.Save
End With
Unload Me

End Sub

'lSteph

On 31 août, 09:56, TITUS wrote:
Bonjour

1 -
J'ai un fichier avec une userform ou sur le bouton fin j'ai le code s uivant.

Private Sub b_fin_Click()
Unload Me
End Sub

Je voudrais qu'en cliquant sur ce bouton, la sauvegarde du classeur s e fasse
en arrière Plan sans que l'utilisateur le voit. Est-ce possible.

2 -
Ce USERFORM alimente un tableau EXCEL 2003.
Je souhaiterais que les enregistrements entrés par ce biais se mett ent au
début du tableau et non à la suite comme d'ahbitude. Est-ce possi ble ?

Si vous avez un esprit éclairé merci de tenter d'éclairer le mi en

Cordialement

--
TITUS






Avatar
lSteph
Re,

suite à ton envoi sur gmail c'est dans ta bal,

lSteph

Private Sub age_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim tst
On Error Resume Next
tst = CDate(Me.age)
On Error GoTo 0
If IsEmpty(tst) Then Cancel = True: MsgBox "date non valide"

End Sub

Private Sub UserForm_Initialize()
Me.profil.AddItem "TNS"
Me.profil.AddItem "AS"

Me.BUT.AddItem "Commercial"
Me.BUT.AddItem "Entreprises"
Me.BUT.AddItem "Cotisations"
Me.BUT.AddItem "Prestations"

Me.Motif.AddItem "Administratif"
Me.Motif.AddItem "Carte Européenne"
Me.Motif.AddItem "Carte Vitale"
Me.Motif.AddItem "CMU"
Me.Motif.AddItem "Contrat"
Me.Motif.AddItem "Etude Santé"
Me.Motif.AddItem "Etude Prévoyance"
Me.Motif.AddItem "Devis Dentaires/Optiques"
Me.Motif.AddItem "Feuilles de soins"
Me.Motif.AddItem "Réclamations"
Me.Motif.AddItem "Règlement"
Me.Motif.AddItem "Renvoi Conseiller Commercial"
Me.Motif.AddItem "Renvoi Intervenant"
Me.Motif.AddItem "Résiliation"
Me.Motif.AddItem "Cas particuliers"

End Sub
Private Sub b_validation_Click()
'Contrôle de validation
Dim msg As String
msg = "Vous devez au moins entrer Nom Prenom et Date de naissance"
If Len(Me.nom) = 0 Then Me.nom.SetFocus: MsgBox (msg): Exit Sub
If Len(Me.Prenom) = 0 Then Me.Prenom.SetFocus: MsgBox (msg): Exit
Sub
If Len(Me.age) = 0 Then Me.age.SetFocus: MsgBox (msg): Exit Sub
'--- Transfert Formulaire dans BD
Application.EnableEvents = False

Call insereLigne

[a2] = UCase(Me.nom)
[a2].Offset(0, 1) = Application.Proper(Me.Prenom)
[a2].Offset(0, 2) = Format(CDate(Me.age), "dd/mm/yyyy")
[a2].Offset(0, 3).FormulaLocal = "ÚTEDIF($C2;$I2;""y"")&"" Ans"""
[a2].Offset(0, 4) = Me.profil
[a2].Offset(0, 5) = Me.BUT
[a2].Offset(0, 6) = Me.Motif
[a2].Offset(0, 7) = Me.Commentaire
[a2].Offset(0, 8) = Now
[a2].Offset(0, 9) = Environ("username")
[a2].Offset(0, 10).FormulaLocal = "=NO.SEMAINE(I2;2)"
[a2].Offset(0, 11) = 1
[a2].Offset(0, 12) = Format(Now, "dddd")
[a2].Offset(0, 13) = Month(Now)
[IV2].FormulaLocal = "=CONCATENER($F2;"" "";$G2)"
[a3:iv3].Copy
[a2:iv2].PasteSpecial Paste:=xlPasteFormats
Application.EnableEvents = True

End Sub
Private Sub b_fin_Click()
With Application
.ScreenUpdating = False
.DisplayAlerts = False
ActiveWorkbook.Save
End With
Unload Me
End Sub


On 31 août, 12:04, lSteph wrote:
...
donc une fois le point en trop enlevé cela devrait aller.
pour le reste il faut modifier le point d'entrée,
Private Sub b_validation_Click()> '--- Positionnement dans la base
[A65000].End(xlUp).Offset(1, 0).Select
'--- Transfert Formulaire dans BD
ActiveCell.Value = Application.Proper(Me.nom)
ActiveCell.Offset(0, 1).Value = Me.Prenom


dépend où commencent tes titres
supposons en
[A3] on va donc insérer les données en a4

Private Sub b_validation_Click()
'ici ta proc de contrôle de validation le cas échéant

Application.enableeventsúlse
'(attention si réaction worksheet_change voulu ou non)
ActiveSheet.Rows(4).Insert
'--- Transfert Formulaire dans BD

[A4]= Application.Proper(Me.nom)
[A4].Offset(0, 1).Value = Me.Prenom
'...etc
'...
Application.enableevents=true
End sub
Cordialement.

lSteph

On 31 août, 11:30, TITUS wrote:

J'espère pour te faciliter la vie, voie le code du classeur.
Merci de ton aide précieuse
Sincèrement
TITUS

Dans la feuille de calcul, voici le code:
Private Sub B_création_simple_Click()
f_création_simple.Show
End Sub

Private Sub b_formulaire_Click()
f_création.Show
End Sub

Private Sub b_modif_Click()
f_modif.Show
End Sub
Private Sub appel_Simple()
F_CréationSimple.Show
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$A$2" And Target.Count = 1 Then
Target = UCase(Target)
End If
End Sub

Dans This Workbook le code est :

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = [A:A] And Target.Count = 1 Then
Target = UCase(Target)
End If
End Sub

Dans le userform le code est :

Sub appel_Simple()
F_CréationSimple.Show
End Sub

Private Sub BUT_Change()

End Sub

Private Sub UserForm_Initialize()
Me.profil.AddItem "TNS"
Me.profil.AddItem "AS"

Me.BUT.AddItem "Commercial"
Me.BUT.AddItem "Entreprises"
Me.BUT.AddItem "Cotisations"
Me.BUT.AddItem "Prestations"

Me.Motif.AddItem "Administratif"
Me.Motif.AddItem "Carte Européenne"
Me.Motif.AddItem "Carte Vitale"
Me.Motif.AddItem "CMU"
Me.Motif.AddItem "Contrat"
Me.Motif.AddItem "Etude Santé"
Me.Motif.AddItem "Etude Prévoyance"
Me.Motif.AddItem "Devis Dentaires/Optiques"
Me.Motif.AddItem "Feuilles de soins"
Me.Motif.AddItem "Réclamations"
Me.Motif.AddItem "Règlement"
Me.Motif.AddItem "Renvoi Conseiller Commercial"
Me.Motif.AddItem "Renvoi Intervenant"
Me.Motif.AddItem "Résiliation"
Me.Motif.AddItem "Cas particuliers"

End Sub
Private Sub b_validation_Click()
'--- Positionnement dans la base
[A65000].End(xlUp).Offset(1, 0).Select
'--- Transfert Formulaire dans BD
ActiveCell.Value = Application.Proper(Me.nom)
ActiveCell.Offset(0, 1).Value = Me.Prenom
ActiveCell.Offset(0, 2).Value = Me.age
ActiveCell.Offset(0, 5).Value = Me.BUT
ActiveCell.Offset(0, 4).Value = Me.profil
ActiveCell.Offset(0, 6).Value = Me.Motif
ActiveCell.Offset(0, 7).Value = Me.Commentaire
ActiveCell.Offset(0, 8).Value = Now
ActiveCell.Offset(0, 9).Value = Environ("username")
End Sub
Private Sub b_fin_Click()
With Application
..screenupdatingúlse
..displayalertsúlse
ActiveWorkbook.Save
End With
Unload Me
End Sub

Dans Module 1 le code est :
Sub appel_Simple()
F_CréationSimple.Show
End Sub
Sub afficheForm()
F_codePostal.Show
End Sub

--
TITUS



Bonjour,

1 -


Private Sub b_fin_Click()
With application
..screenupdatingúlse
..displayalertsúlse
Activeworkbook.save
end with
Unload Me
End Sub

2 -
sauf précisions sur le contenu de ce Userform type et nombre de

contrôles Supposons dans la feuille Date Nom Prénom Montant et da ns le
frm
3 TextBox

Private Sub b_fin_Click()
Dim i As Integer
For i = 1 To 3
If Len(Me.Controls("TextBox" & i)) = 0 Then
Me.Controls("TextBox" & i).SetFocus
Exit Sub
End If
Next
ActiveSheet.Rows(2).Insert
[A2] = Format(Now, "dd/mm/yyyy")
[B2] = TextBox1
[C2] = TextBox2
[D2] = CSng(TextBox3)
[D2].NumberFormat = "0.00"
With Application
..ScreenUpdating = False
..DisplayAlerts = False
ActiveWorkbook.Save
End With
Unload Me

End Sub

'lSteph

On 31 août, 09:56, TITUS wrote:
Bonjour

1 -
J'ai un fichier avec une userform ou sur le bouton fin j'ai le code suivant.

Private Sub b_fin_Click()
Unload Me
End Sub

Je voudrais qu'en cliquant sur ce bouton, la sauvegarde du classeur se fasse
en arrière Plan sans que l'utilisateur le voit. Est-ce possible.

2 -
Ce USERFORM alimente un tableau EXCEL 2003.
Je souhaiterais que les enregistrements entrés par ce biais se me ttent au
début du tableau et non à la suite comme d'ahbitude. Est-ce pos sible ?

Si vous avez un esprit éclairé merci de tenter d'éclairer le mien

Cordialement

--
TITUS