Good day to everyone,

Being a total newbie to excel userforms, I followed an online tutorial to make the attached file below:

picture_viewer.xlsm

What it does is view data with pictures and another tab puts in new data and picture.

What I want to do is replace the txtFileName into a combo box so I can choose the picture (and corresponding data) to view. I have been trying using a code like this (that I got from a different example) changing references to match the program but I keep getting a Runtime Error 424 Object required.

Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = Worksheets("OPPEDCT")
Dim cell As Range
With Range("A6", Range("A404").End(xlUp))
Set cell = .Find(ComboBox1.Value, LookIn:=xlValues)
If ComboBox1.Value = "" Then
MsgBox "Enter Physician Name"
Unload Me
End If
End With

Private Sub UserForm_Initialize()
ComboBox1.SetFocus
lastrow = Worksheets("OPPEDCT").UsedRange.Rows.Count
OPPEForm.ComboBox1.ColumnCount = 1
OPPEForm.ComboBox1.RowSource = "A6:A" & lastrow
OPPEForm.ComboBox1.ListIndex = -1


I want to learn. Any help/tip is greatly appreciated. TYVMIA