View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
namenorg namenorg is offline
external usenet poster
 
Posts: 4
Default copy query table data

when i run the following macro i get the data from the website, but when i
try to copy it to another location i get the following: "ExternalData_55:
Getting Data €¦"

how can i get the macro to wait for the data to be imported before copying?

any help is greatly appreciated - here is macro:

Sub MacroTest1()

With
ActiveSheet.QueryTables.Add(Connection:="URL;http://www.license.state.tx.us/ABProjectRegistrationOnline/ABProjectPrintConfirmationGeneral.aspx?strWhereURL =ABDataSearch&strProjNum=EABPRJA8800466", Destination:=Range("a1"))
.WebFormatting = xlNone
.WebSelectionType = xlSpecifiedTables
.WebTables = "5"
.Refresh
End With
Range("a1").Copy
Range("b1").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

End Sub