Excel VBA code to connect teradata SQL server and execute query

Connectivity

Excel VBA code to connect teradata SQL server and execute query

I am getting error when trying to use vba code to connect teradata sql through excel 2010. I also want to execute records to excel. Can someone help me with the query for the same