Buraya neden eklemiyorsunuz ?
Çözüm bulacağımız kesin, başkalarıda yararlansın...
Please return your positive or negative ...
Dim dlg As FileDialog
Dim si As Variant
Dim FileName As String
Dim vrtSelectedItem As Variant
Set trz = Application.FileDialog(msoFileDialogFilePicker)
With trz
.AllowMultiSelect = False
.ButtonName = "Resim Seç"
.Filters.Add "Resimler", "*.gif; *.jpg; *.jpeg; *.bmp"
.Filters.Add "Hepsi", "*.*"
.FilterIndex = 0
.InitialFileName = Environ("UserProfile") & "My Documents*.bmp;*.gif;*.jpg;*"
.InitialView = msoFileDialogViewThumbnail
.Title = "Resim Seç..."
If .Show = True Then
For Each vrtSelectedItem In .SelectedItems
FileName = vrtSelectedItem
Next vrtSelectedItem
Me.resim = FileName
Me.cerceve.Picture = FileName
End If
End With
On Error GoTo trz
If Not IsNull([resim]) Then
Me.cerceve.Picture = [resim]
Else
Me.cerceve.Picture = ""
End If
Exit Sub
trz:
If Err = 2220 Then
Me.cerceve.Picture = ""
Else
MsgBox Err.Description, vbExclamation
End If