excel pivot table with sql query and visual basic macros

J

jpeevey

I have a pivot table that runs off a sql query, it has macros and parameters
built into the report. It worked until the client updated their server and
db software.

When debugging this, on the module under the closedb it stops here:


Sub CloseDB()
'IF CONNECTION IS OPEN IT NEEDS TO BE CLOSED SO AN ERROR IS NOT THROWN
If rsData.State = 1 Then
rsData.Close
Set rsData = Nothing
End If

cnData.Close
Set cnData = Nothing

Set Cmd = Nothing
End Sub

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top