bonjour
je souhaite pouvoir, sur clic d'un bouton enregistrer sous un état dans un lieu à choisir par l'utilisateur
j'ai les fonctions suivantes qui marchent bien et répondent à ma demande
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 Function findpath() Dim dlgopen As Object Set dlgopen = Application.FileDialog(msoFileDialogSaveAs) With dlgopen .AllowMultiSelect = False If .Show = -1 Then findpath = .SelectedItems(1) Else findpath = "Aborted" End If End With End Functionmaintenant je souhaite pouvoir, dans la zone "nom de fichier" de la boite qui va s'ouvrir mettre une valeur par défaut, récupérée dans mon appli, afin d'avoir un nom de fichier par défaut (qui reste modifiable) et non une zone vierge
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 Private Sub bSave_Click() filename = findpath If filename = "Aborted" Then info = MsgBox("Operation aborted by user", vbCritical, "Save copy") DoCmd.SetWarnings True Exit Sub End If DoCmd.OutputTo acReport, "DISPLAY_ORDO", "SnapshotFormat(*.snp)", filename, False, "", 0 End Sub
savez vous comment faire ?
merci
laurent
Partager