P
philboy
Guest
bonjour a tous, je bloque sur un truc:
j'ai une userform avec une textbox et un commandbutton
j'aimerai enregistrer une feuil dans un dossier en mettant directment le nom du fichier dans la textbox. voila mon code pour l'instant:
Private Sub CommandButton1_Click()
'creation dune nouvelfeuil pour copier-coller'
Cells.Select
Selection.Copy
Workbooks.Add
Cells.Select
ActiveSheet.Paste
Application.CutCopyMode = False
'enregistrement'
ChDir "C:"
Application.Dialogs(xlDialogSaveAs).Show
ActiveWindow.SmallScroll Down:=-6
ActiveWindow.Close
Range("A10").Select
Unload Me
End Sub
Voila tout, j'aimerai savoir ou mettre la textbox1.value pour que ca rentre le nom du fichier.
Merci d'avance a tous pour vos lumieres
j'ai une userform avec une textbox et un commandbutton
j'aimerai enregistrer une feuil dans un dossier en mettant directment le nom du fichier dans la textbox. voila mon code pour l'instant:
Private Sub CommandButton1_Click()
'creation dune nouvelfeuil pour copier-coller'
Cells.Select
Selection.Copy
Workbooks.Add
Cells.Select
ActiveSheet.Paste
Application.CutCopyMode = False
'enregistrement'
ChDir "C:"
Application.Dialogs(xlDialogSaveAs).Show
ActiveWindow.SmallScroll Down:=-6
ActiveWindow.Close
Range("A10").Select
Unload Me
End Sub
Voila tout, j'aimerai savoir ou mettre la textbox1.value pour que ca rentre le nom du fichier.
Merci d'avance a tous pour vos lumieres