Sub Macro1()
for i = 1 to 10
myname = Application.InputBox("enter name")
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.abcefg.com/web/code=myname" _
, Destination:=Range("A"& i))
.Name = ......
.FieldNames = ......
' 省略......
End With
next i
End Sub
更新1:
個網址變左呢個 , 而唔係我係inputbox 入既資料, 所以做唔到想要效果. URL;http://www.abcefg.com/web/code=myname