[問題] VBA excel超連結的問題

看板Programming作者 (山姆田)時間17年前 (2008/04/10 17:23), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
excel有個web查詢 我的檔案格式如下 網址連結 網路上的內容 我想要更改網址連結的部分 然後就可以用一個巨集 1.刪除原本的web查詢 2.自動複製超連結裡面的網址 3.把複製的網址再變成新的web查詢 程式碼如下 這是我手動錄製下來再改的 不過run不過......... 卡在最後一行 .Refresh BackgroundQuery:=False Sub Macro1() Dim WebSite As String WebSite = Sheets("晨星").Hyperlinks(20).Address ActiveCell.Offset(1, 0).Range("A1:B8").Select Selection.QueryTable.Delete Selection.ClearContents With ActiveSheet.QueryTables.Add(Connection:= _ "URL;WebSite" _ , Destination:=Range("$A$232")) .Name = "FundQT.asp?Country=HKG&Symbol=F0000001JD" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = "23" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With End Sub -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.175.177.115
文章代碼(AID): #17_Togdx (Programming)