chinel
XLDnaute Impliqué
Salut tout le monde !
j'ai un fichier quand je le sauvegarde, il va bien (voir ci dessous)
1) Sheets("Planning").Copy
'Suppression des boutons (ActiveX) dans la feuille
For Each Obj In ActiveSheet.OLEObjects
If TypeOf Obj.Object Is MSForms.CommandButton Then Obj.Delete
Next
Application.DisplayAlerts = False
ActiveSheet.DrawingObjects.Delete
Sauvegarde.Show
Else
MsgBox "Tu pourras le faire plus tard !"
End If
End Sub
2)Private Sub UserForm_Initialize()
PasDeCroix Me
TextBox1.Value = "C:\Documents and Settings\Manuel Dejong\Bureau\Archive Planning-"
TextBox2.Value = "-Patrick Jacquet-" & "-du-" & Range("C1") & "-en pause-" & Range("I1") & "-enregistrer le-"
End Sub
Private Sub TextBox1_Change()
If TextBox1 = "" Then MsgBox "Il faut entrer un chemin valide !"
End Sub
Private Sub TextBox2_Change()
If TextBox2 = "" Then MsgBox "Il faut entrer un nom valide !"
End Sub
Private Sub CommandButton1_Click()
On Error Resume Next
With ActiveWorkbook
.SaveAs TextBox1 & TextBox2 & Format(Date, "dd mmm"), FileFormat:=xlExcel4
.Close
End With
Unload Me
End Sub
mais quand je le mets dans un autre pc il ne fonctionne pas, j'ai cru un moment que c'était le chemin qui était différent alors j'ai modifié mais sans résultat !
alors j'ai besoin de votre aide un grand merci !!!
j'ai un fichier quand je le sauvegarde, il va bien (voir ci dessous)
1) Sheets("Planning").Copy
'Suppression des boutons (ActiveX) dans la feuille
For Each Obj In ActiveSheet.OLEObjects
If TypeOf Obj.Object Is MSForms.CommandButton Then Obj.Delete
Next
Application.DisplayAlerts = False
ActiveSheet.DrawingObjects.Delete
Sauvegarde.Show
Else
MsgBox "Tu pourras le faire plus tard !"
End If
End Sub
2)Private Sub UserForm_Initialize()
PasDeCroix Me
TextBox1.Value = "C:\Documents and Settings\Manuel Dejong\Bureau\Archive Planning-"
TextBox2.Value = "-Patrick Jacquet-" & "-du-" & Range("C1") & "-en pause-" & Range("I1") & "-enregistrer le-"
End Sub
Private Sub TextBox1_Change()
If TextBox1 = "" Then MsgBox "Il faut entrer un chemin valide !"
End Sub
Private Sub TextBox2_Change()
If TextBox2 = "" Then MsgBox "Il faut entrer un nom valide !"
End Sub
Private Sub CommandButton1_Click()
On Error Resume Next
With ActiveWorkbook
.SaveAs TextBox1 & TextBox2 & Format(Date, "dd mmm"), FileFormat:=xlExcel4
.Close
End With
Unload Me
End Sub
mais quand je le mets dans un autre pc il ne fonctionne pas, j'ai cru un moment que c'était le chemin qui était différent alors j'ai modifié mais sans résultat !
alors j'ai besoin de votre aide un grand merci !!!