Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I am using Excel and want to fill list boxes with information stored in SQL Server. How can I do this using ODBCDirect?

0
10 Posted

I am using Excel and want to fill list boxes with information stored in SQL Server. How can I do this using ODBCDirect?

0
10

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123