Цитата(cardinal @ 23.3.2006, 16:45 ) | | Нет, именно обычно надо чтобы фалй был закрыт. Код выкладывай |
| Код | Set cn = New ADODB.Connection With cn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "data source=" & App.Path & "\2005.xls;" & "Extended Properties=Excel 8.0;" .Open End With Set RcSet = New ADODB.Recordset
RcSet.Open "Select * from [2005$]", cn With cn1 .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "data source=" & App.Path & "\2006.xls;" & "Extended Properties=Excel 8.0;" .Open End With Set RcSet1 = New ADODB.Recordset RcSet1.Open "Select * from [2006$]", cn1
Do While Not RcSet1.EOF Do While Not RcSet.EOF If RcSet.Fields(1).Value = RcSet1.Fields(1).Value Then RcSet1.Delete RcSet1.MoveNext RcSet1.Update End If RcSet.MoveNext Loop RcSet.MoveFirst RcSet1.MoveNext Loop
|
Может я вообще все не так делаю?! |