that worked, but i had to change a few things. this is what the code is in case anyone is interested:
If Right$(Me.OpenText.FileName, 3) = "pge" Then Me.Icon = pge.Picture
If Right$(Me.OpenText.FileName, 4) = "note" Then Me.Icon = note.Picture