Skip to main content

AccessTr.neT


N Kadar CSV Dosyasını Access İçine Atmak

N Kadar CSV Dosyasını Access İçine Atmak

#2
(23/10/2020, 22:18)aliyuzen yazdı: browser - gözat penceresini çalıştıran bir buton olsa

Merhaba alttaki gibi kod işinizi görmez mi?
Denemedim lakin olacağını sanıyorum örnek açısından.Kodu internetten bulup ekledim.
Heralde multiselect=true gibi bir özellikte vardı unuttum.

Sub SelectFolder4()
Dim sFolder As String
' Open the select folder prompt
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = "C:\Windows\"
If .Show = -1 Then ' if OK is pressed
sFolder = .SelectedItems(1)
End If
End With

If sFolder <> "" Then ' if a file was chosen
' *********************
' put your code in here
' *********************
End If
End Sub

Alttaki kod heralde file için önceki klasör olması gerek.

Private Sub cmdFileDialog_Click() 

' Requires reference to Microsoft Office 11.0 Object Library.

Dim fDialog As Office.FileDialog
Dim varFile As Variant

' Clear listbox contents.
Me.FileList.RowSource = ""

' Set up the File Dialog.
Set fDialog = Application.FileDialog(msoFileDialogFilePicker)

With fDialog

' Allow user to make multiple selections in dialog box
.AllowMultiSelect = True

' Set the title of the dialog box.
.Title = "Please select one or more files"

' Clear out the current filters, and add our own.
.Filters.Clear
.Filters.Add "Access Databases", "*.MDB"
.Filters.Add "Access Projects", "*.ADP"
.Filters.Add "All Files", "*.*"

' Show the dialog box. If the .Show method returns True, the
' user picked at least one file. If the .Show method returns
' False, the user clicked Cancel.
If .Show = True Then

'Loop through each file selected and add it to our list box.
For Each varFile In .SelectedItems
Me.FileList.AddItem varFile
Next

Else
MsgBox "You clicked Cancel in the file dialog box."
End If
End With
End Sub
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
RE: N Kadar Excel Dosyasını Access İçine Atmak - Yazar: feraz - 24/10/2020, 00:46
Task