I fear I may need a little more direction on the named range piece. I have created two named ranges and what I want to do is import the last column in the named range. I thought I would put the named range here:
Code:
cnRs.Open "SELECT * FROM [NamedRange]", cn
However, that did not work. It appears to go into an endless loop and when I close the spreadsheet to break the code I get a Run-time error stating the Jet database engine could not find the object. Maybe my syntax is off in referencing the named range? I also though I should put the named range in this piece of code:
Code:
With cnRs
Do Until .EOF
If InStr(.Fields("NamedRange"), "$") > 0 Then
Debug.Print .Fields("NamedRange")
End If
.MoveNext
Loop
End With
However, I get another run-time error "Item cannot be found". Thanks in advance for your help.