View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chris F Chris F is offline
external usenet poster
 
Posts: 2
Default ODBC Link changing selection criteria

Hi
I have an ODBC link to some accounts data. I want to list the transactions
for a date range. I have DateFrom and DateTo named ranges. I have a macro
to refresh the data but this gets all of the data and I want to restrict the
data returned to the date range, which changes on a regular basis.

The refresh data line in the macro is below. Can I change this to pick up
the date from and date to criteria from the named ranges at the time of
refreshing the data?

Selection.QueryTable.Refresh BackgroundQuery:=False

Thanks

Chris