"Cannot run in Excel connection
Set cn = CreateObject("ADODB.Connection")
cn.Open "Driver={Microsoft Excel Driver (*.xls)};DBQ=C:\testing.xls; ReadOnly=False;"
''It shows error message at this line
''Sheet1' is sheet name, 'COLUMN1', 'COLUMN2' are column names
Set rs = cn.Execute ("select * from [Sheet1$] where COLUMN1='2'")
Do while not rs.eof
msgbox rs.Fields("COLUMN2").Value
Loop
Set rs= nothing
Set con= nothing