View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] metricsinstitute@gmail.com is offline
external usenet poster
 
Posts: 22
Default Reference named range in closed workbook

Strange behavior with the provided sample sales.xls (or any other wbk)
szSQL = "SELECT * FROM [Sales$A1:E19];"
Set rsData = New ADODB.Recordset
rsData.Open szSQL, szConnect, adOpenForwardOnly, adLockReadOnly, adCmdText
Sheet1.Range("A1").CopyFromRecordset rsData

If a column contains both numerical and string values, only the numerical values are copied !!!

Any idea?