Removing DATA Connections

S

Saucer Man

I have a macro which imports a .csv file in Excel 2003. We do it once a
day. When I open the sheet in Excel 2007, I see that Data connections are
building up daily. The macro looks like this...

Set rng = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
With
ActiveSheet.QueryTables.Add(Connection:="TEXT;\\Data-store\UPS_CSV_EXPORT.csv",
Destination:=rng)
.Name = "UPS_CSV_EXPORT"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Set rng = Nothing

How can I delete these connections with Excel 2003? I cannot even find the
dialog to view them.
 

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

Similar Threads

Macro / VBA help 4-5-12 1
Help with VBA Macro needed 3
Import data 1
VBA: how to get variables into querry code 2
Debug Error 3
Help in VBA code! 5
excel importing data 16
Yet more VBA Help! 5

Top