ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using ADO to INSERT Named Range Values into DB (https://www.excelbanter.com/excel-programming/326094-using-ado-insert-named-range-values-into-db.html)

[email protected]

Using ADO to INSERT Named Range Values into DB
 
Is there a way that I can insert the contents of a named range within
Excel into a SQL Server database using ADO?


al

Using ADO to INSERT Named Range Values into DB
 
Assuming you already know how to insert values into a sql server table,
you would simply have to refer to the value property of the range name.

In this example, test is a global range name; department is a field within a
sql server table.

..Fields("department") = Range("test").Value


All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com