Quote:
Originally Posted by Ben McClave
Jerry,
Is it the same error, or a different one? If you are trying it in a workbook that has not been saved, then you may get an error on the line:
cn.Open strCon
If so, try saving the workbook and running it again. If that is not the issue, you may also want to double-check any Range references in the code. For example, the sSQL parameter assumes that the relevant column header on the "ICD" sheet is in cell A1. If this is incorrect, the SQL query will break.
|
Hi Ben !
the workook is saved. the error on cn.Open strCon says:
Incompatible type of data in the expression of the criteria .
I have cheked the references. but still not working.
do you know if there is another way to do it without using SSQL ?
cheers,
jerry