Remove all data connections from Excel Workbook


/ Published in: Visual Basic
Save to your folder(s)

Code is VBA...


Copy this code and paste it in your HTML
  1. Sub deleteConnections()
  2.  
  3. For i = 1 To ActiveWorkbook.Connections.Count
  4. If ActiveWorkbook.Connections.Count = 0 Then Exit Sub
  5. ActiveWorkbook.Connections.Item(i).Delete
  6. i = i - 1
  7. Next i
  8.  
  9. End Sub

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.