friends
Is there any VBA code to append all existing queries
Bard Code Is
but not work
Is there any VBA code to append all existing queries
Bard Code Is
Code:
Sub CombineAllQueries()
Dim query As WorkbookQuery
Dim combinedQuery As String
For Each query In ActiveWorkbook.Queries
combinedQuery = combinedQuery & " " & query.Formula & " " & Chr(13) & " " & Chr(10)
Next query
ThisWorkbook.Queries.Add Name:="CombinedQuery", Formula:=combinedQuery
End Sub
but not work