Public Function SQL_Execute() Dim dbName As String, Cnn As ADODB.Connection dbName = ActiveWorkbook.Path + "\" + ActiveWorkbook.Name Set Cnn = New ADODB.Connection Cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & dbName & ";" & _ "Extended Properties=""Excel 8.0;HDR=YES;"";" Cnn.Execute " UPDATE List1 SET List1.СтавкаР =1 " Cnn.Close End Function
Cnn.Execute "UPDATE List1 SET List1.СтавкаР=" & 1