Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default activeworkbook connections.delete not working

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.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete Connections from Excel erick-flores Excel Programming 5 April 4th 08 08:07 PM
Delete Columns/Row not working PGWU Excel Discussion (Misc queries) 6 May 8th 07 12:16 AM
Delete Row Sub not working ExcelMonkey Excel Programming 1 March 20th 07 04:55 PM
ActiveWorkbook.SendMail not working Craig[_24_] Excel Programming 1 March 7th 06 04:50 AM
ActiveWorkbook.Charts.Delete Richard1284[_4_] Excel Programming 1 May 25th 04 04:47 PM


All times are GMT +1. The time now is 03:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"