ERROR: Variant does not contain an object

I get the error on the line below:

Sub …

fields = “Title,Surname,GName,MInitial,Fname”

fieldlist = Split(fields,",")

addvalues fieldlist

End Sub

Sub addvalues (fieldlist As Variant)

For j = 0 To Ubound(fieldlist)

If doc.GetItemValue(fieldList(j))(0) <> “” Then

worddoc.FormFields(“Text” & Cstr(x)).result = doc.GetItemValue(fieldList(j))(0)

xlSheet.Cells(x,1).value = doc.GetItemValue(fieldList(j))(0) ** ERROR: Variant does not contain an object

End If

x = x + 1

Next

End Sub

Subject: ** SOLVED **

Sorry, my bad. I didn’t declare the xlSheet as Variant for all my subs to see.

Sorry about that. Please ignore my post.

Thx