Wie öffne ich in Access 2013 per Button den Dateiexplorer und fülle den Pfad in ein Textfeld?
Das habe ich mit einem VBA Code geschafft, nun ist das Problem, dass ich den Pfad welchen ich im Explorer ausgesucht habe nicht in das Textfeld bekomme... Vielen Dank für eure Hilfe!
2 Antworten
Lass uns doch deinen VBA-Code sehen...
Hier der 1. Treffer in Google ist bestimmt das was du wolltest.
http://software-solutions-online.com/2014/03/11/excel-vba-open-file-dialog/
Vielen Dank! Habe immer gedacht VBA sei schwer darum habe ich diese Vorschläge von Google ignoriert. Aber vielen Dank! :D
Das ist mein VBA Code für das öffnen und einfügen eines Pfades aus dem Explorer
Private Sub cmdBildPfad_Click()Dim intChoice As IntegerDim strPath As String'only allow the user to select one fileApplication.FileDialog(msoFileDialogOpen).AllowMultiSelect = False'make the file dialog visible to the userintChoice = Application.FileDialog(msoFileDialogOpen).Show'determine what choice the user madeIf intChoice <> 0 Then 'get the file path selected by the user strPath = Application.FileDialog( _ msoFileDialogOpen).SelectedItems(1) 'print the file path to sheet 1 LabelEingabe = strPathEnd IfEnd Sub
Vielleicht hilft Dir das hier weiter:
http://www.ms-office-forum.net/forum/showthread.php?t=298704