ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SQL Keyword (https://www.excelbanter.com/excel-programming/312640-sql-keyword.html)

S Taylor[_2_]

SQL Keyword
 
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

Tom Ogilvy

SQL Keyword
 
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.

--
Regards,
Tom Ogilvy



"S Taylor" wrote in message
om...
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




Dick Kusleika[_3_]

SQL Keyword
 
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.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"S Taylor" wrote in message
om...
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





All times are GMT +1. The time now is 08:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com