Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
If rs.State = adStateOpen Then rs.Close
If cn .State = adStateOpen Then cn.Close
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
If rs.State = adStateOpen Then rs.Close
If cn .State = adStateOpen Then cn.Close