Help: External Data Range Properties - can I disable Save Query Definition with VBA?

dcaqu

New member
Joined
Oct 1, 2012
Messages
1
Reaction score
0
Points
0
Anyone know how I can disable the External Data Range Properties - Save Query Definition Property with code in a Sub Procedure? I've tried recording a Macro to see how it might be done but the code doesn't show this property as being part of the QueryTable Property list. The Macro code Excel recorded is below. Anyone any ideas if this can be done and if so how?
Thanks.

Option Explicit

Sub Macro3()
'Macro3 Macro

With Selection.QueryTable
.Name = "False_2"
.UseListObject = False
.FieldNames = False
.RowNumbers = False
.FillAdjacentFormulas = False
.HasAutoFormat = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.TablesOnlyFromHTML = True
.TextFilePromptOnRefresh = "Amlin MSN Query"
End With
End Sub

 
Back
Top