Yes, you can do it. Try it with Tools > External Data to start with.
For the commands - try recording macro with all the steps starting from Tools - External Data and then selecting your ODBC connection.
IT works great !!
It should look alike following :
With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _
"ODBC;DSN=prod;UID=;PWD=;DBQ=PROD;DBA=W;APA=T;EXC=F;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;GDE=F;FRL=F;BAM=IfAllSuccessful;MT" _
), Array("S=F;MDI=F;CSR=F;FWC=F;PFC=10;TLO=0;")), Destination:=Range("G9"))
.Sql = sqlname & Chr(13) & "" & Chr(10) & ""
.FieldNames = False
.RefreshStyle = xlDeleteCells
.RowNumbers = False
.FillAdjacentFormulas = False
.RefreshOnFileOpen = False
.HasAutoFormat = False
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SavePassword = True
.SaveData = False
End With