Skip to main content

AccessTr.neT


Dosya konumunu alma

Dosya konumunu alma

#2
Kodu aşağıdaki ile değiştirerek deneyiniz. Ayrıca ' ile iptal edilen alanlara işlem yapılmadı.

Sub getFileName()
   ' Displays the Office File Open dialog to choose a file name
   ' for the current employee record.  If the user selects a file
   ' display it in the image control.
   'Me.resim = Null
   Dim fileName As String
   Dim Result As Integer
   With Application.FileDialog(msoFileDialogFilePicker)
       .Title = "Dosya Seç"
       .Filters.Add "Bütün dosya türleri", "*.*"
       .Filters.Add "WORD", "*.docx"
       '.Filters.Add "word_eski", "*.doc"
       '.Filters.Add "text", "*.txt"
       '.Filters.Add "excel_yeni", "*.xlsx"
       '.Filters.Add "excel_eski", "*.xls"
       '.Filters.Add "Gif", "*.gif"
       '.FilterIndex = 1
       '.AllowMultiSelect = False
      .InitialFileName = "c:\"
       Result = .Show
       If (Result <> 0) Then
          fileName = Trim(.SelectedItems.Item(1))
           Me.dosya_konumu.SetFocus
           Me.dosya_konumu = Left(fileName, InStrRev(fileName, "\"))
         ''  Me.dosya_konumu = Dir(fileName)
          ' Me![baski-desen-no].SetFocus
          ' Me![resim].Visible = False
          'Call resim_AfterUpdate
       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
Dosya konumunu alma - Yazar: tufanbal - 29/11/2016, 09:36
Cvp: Dosya konumunu alma - Yazar: ozanakkaya - 29/11/2016, 10:25
Cvp: Dosya konumunu alma - Yazar: tufanbal - 29/11/2016, 16:56
Cvp: Dosya konumunu alma - Yazar: ozanakkaya - 29/11/2016, 17:34
Cvp: Dosya konumunu alma - Yazar: access_delisi - 01/12/2016, 21:56
Cvp: Dosya konumunu alma - Yazar: tufanbal - 02/12/2016, 10:48
Cvp: Dosya konumunu alma - Yazar: atoz112 - 01/12/2016, 21:09
Cvp: Dosya konumunu alma - Yazar: tufanbal - 01/12/2016, 21:11