f is the file dialog object.
.selecteditems is a collection, which is an object.
.selectedItems(i) is one specific member of that collection, which is the path to the file, which AFAIK is text.
However, list item variables are always(?) declared as variants.
I would guess that String would be what you want because the collection list is text based.
EDIT
Sigghhh, you weren't there when I started...
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.