Good afternoon:

I have a form, in which i want to put a command button and an ole object(that will be an image preview).

if i click the command button , it opens a "box" which itīs possible to choose what picture to display in the Ole Object.

I have gone so far to this code:

in which:
- command18 its the command button;
- im1 itīs the Ole Object

Private Sub Command18_Click()
Dim FName As String
Dim result As Integer
With Application.FileDialog(1) ' It is corrected : With Application.FileDialog(msoFileDialogOpen)
.Title = "Select picture"

.InitialFileName = "G:\FaxInforme" 'default path
.AllowMultiSelect = False
.Filters.Add "Picture files", "*.bmp; *.jpg", 1
result = .Show
If result = 0 Then Exit Sub
FName = Trim(.SelectedItems.Item(1))
End With
On Error Resume Next
Me.im1 = FName
End Sub

i canīt put the choosen picture in the ole box, please help!