Hi All,
Hopefully I explain this well......... I have a Excel 2007 spreadsheet which has a data connection to an Access 2007 table. In
VB I do a Run Macro1 which does a RefreshAll and then removes the data connection. The disconnect is not working in automation but if I step thru it the disconnect happens. So, I don't understand why it does not work when run as automation but does work in debug mode.
Sub Macro1()
'
ActiveWorkbook.RefreshAll
'
Call Macro2
'
End Sub
Public Sub Macro2()
ActiveWorkbook.Connections("Query from MS Access Database1").Delete
End Sub
thanks
bobh.