I am using Excel and want to fill list boxes with information stored in SQL Server. How can I do this using ODBCDirect?
Filling a listbox in Excel is just as easy using an additional DAO method, GetRows, which stores the recordset results into an array. In the code sample below we have already created a connection to SQL Server and stored the connection in the object “Connection”. We use the GetRows method to retrieve the information into an array. Lastly, we use Excel’s Transpose function to transpose the array and fill the listbox.
Related Questions
- I have a large address list stored as an Excel file. Is there any way to import it besides manually copying and pasting the individual entries?
- I am using Excel and want to fill list boxes with information stored in SQL Server. How can I do this using ODBCDirect?
- I see an option Save to XL in the Watch list. How can I import data in the excel sheet?