hi, expertsnd
i would some help to adjust my code i have workbook and pictures in the same directory i want when i press command button open on userform it open from this directory
"C:\Users\alhagag\Downloads\"
Code
Private Sub CommandButton1_Click()
'=======================
Dim strFileName
Dim MyPath As String
Me.image_user.Picture = LoadPicture("C:\Users\alhagag\Downloads\")
strFileName = Application.GetOpenFilename(filefilter:="Tiff Files(*.tif;*.tiff),*.tif;*.tiff,JPEG Files (*.jpg;*.jpeg;*.jfif;*.jpe),*.jpg;*.jpeg;*.jfif;*.jpe,Bitmap Files(*.bmp),*.bmp", FilterIndex:=2, Title:="Select a File", MultiSelect:=False)
If strFileName = False Then
Me.image_user.Picture = LoadPicture(strFileName)
Else
MsgBox "it doesn't choose anything", vbExclamation, "wrong"
a19.Value = strFileName
End If
End Sub
Display More