SQL Keyword

  • Thread starter Thread starter S Taylor
  • Start date Start date
S

S Taylor

I am VBA user that has recently made the switch from Excel 97 to Excel
2003. Frequently in my code in '97 I used statements such as:

ActiveCell.QueryTable.Sql = ....

but in Excel 2003 I do not see a reference to the Sql keyword.

Has it been replaced? If so, what with? Thanking you in anticipation.

S Taylor
 
goto the object browser in the VBE

Right click in a gray area and select show hidden

do a search on SQL

You will see it is still there.
 
S

The new property is CommandText, but Sql still works (as Tom points) out.
If you need your app to be backward compatible with 97, stick with Sql.
CommandText was introduced in 2000.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top