Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to use the parameters feature of query tables and keep getting a
type mismatch. Below is code: Dim param1 As QueryTable.Paramters Dim param2 As QueryTable.Parameters Dim qt As QueryTable Set qt = Sheets("sheet1").QueryTables(1) qt.Sql = "select wodate from natop.dbo.workmast where (wodate between ? and ?)" Set param1 = qt.Parameters.Add("Start Parameter", xlParamTypeVarChar) param1.SetParam xlConstant, "01/01/2005" Set param2 = qt.Parameters.Add("End Parameter", xlParamTypeVarChar) param2.SetParam xlConstant, "04/01/2005" qt.Refresh The mismatch is coming on my first dim statement. What am I doing wrong? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
QueryTables Add | Excel Programming | |||
Error when trying to use QueryTables.Add | Excel Programming | |||
With ActiveSheet.QueryTables.Add | Excel Programming | |||
QueryTables Interrupt if URL is Down | Excel Programming |