传统的Excel VBA编写方式是什么?
有没有更紧凑和/或传统的方式来写这个?
With ActiveSheet.QueryTables.Add(Connection:="URL;http://carbon.brighterplanet.com/flights.txt", Destination:=Range("A2")) .PostText = "origin_airport=MSN&destination_airport=ORD" .RefreshStyle = xlOverwriteCells .SaveData = True .Refresh End With
PostText
在第二行时是否有Connection
写在第一行?
Connection
和Destination
是Add
函数的必需参数,而PostText
(etc)是QT的一个属性。 Add
函数既没有Connection
也没有作为parameter passing的属性。
看到这个和这个额外的参考。