Hi,
I'm very new to VBA for EXCEL 2010.
I wrote a query with a where clause :
WHERE
TC.TimeCardDateTime = '2015-07-08'
and then a VBA piece:
Private Sub RefreshQuery()
With ActiveWorkbook.Connections("MSP_RECON").OLEDBConnection
.CommandText = "EXECUTE TC.TimeCardDateTime '" & Range("D2").Value & "'"
End With
ActiveWorkbook.Connections("MSP_RECON").Refresh
End Sub
Question 1 : The VBA codes gives error Subscript out or Range
Question 2 : How to I modify the VBA go look at a range of rates ( Where TC.TimeCardDateTime between '2015-01-01' and '2015-10-12'
Thank you very much!
I'm very new to VBA for EXCEL 2010.
I wrote a query with a where clause :
WHERE
TC.TimeCardDateTime = '2015-07-08'
and then a VBA piece:
Private Sub RefreshQuery()
With ActiveWorkbook.Connections("MSP_RECON").OLEDBConnection
.CommandText = "EXECUTE TC.TimeCardDateTime '" & Range("D2").Value & "'"
End With
ActiveWorkbook.Connections("MSP_RECON").Refresh
End Sub
Question 1 : The VBA codes gives error Subscript out or Range
Question 2 : How to I modify the VBA go look at a range of rates ( Where TC.TimeCardDateTime between '2015-01-01' and '2015-10-12'
Thank you very much!