亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

我的Web查詢宏的問題

我的Web查詢宏的問題

HUH函數 2019-11-20 14:46:34
我編寫了一個Web查詢宏,用于根據單元格A1中的值從Yahoo Finance導入財務報表。在過去的幾周中,它一直無縫運行,但是突然,它不再返回任何數據(但不會產生錯誤)。如果有人有任何見解,請多多關照。我在下面發布了代碼-謝謝!Sub ThreeFinancialStatements()   On Error GoTo Explanation   Rows("2:1000").Select    Selection.ClearContents    Columns("B:AAT").Select    Range(Selection, Selection.End(xlToRight)).Select    Selection.ClearContents    Dim inTicker As String    inTicker = Range("A1")    ActiveSheet.Name = UCase(inTicker)    GetFinStats inTicker    Exit SubExplanation:   MsgBox "Please make sure you type a valid stock ticker symbol into cell A1 and are not trying to create a duplicate sheet." & _   vbLf & " " & _   vbLf & "Also, for companies with different classes of shares (e.g. Berkshire Hathaway), use a hyphen to designate the ticker symbol instead of a period (e.g. BRK-A)." & _   vbLf & " " & _   vbLf & "Please also note that not every company has three years of financial statements, so data may appear incomplete or missing for some companies.", _  , "Error"   Exit SubEnd SubSub GetFinStats(inTicker As String)'' GetBalSheet Macro''    With ActiveSheet.QueryTables.Add(Connection:= _        "URL;http://finance.yahoo.com/q/bs?s=" & inTicker & "+Balance+Sheet&annual", Destination:= _        Range("$D$1"))        .Name = "bs?s=PEP+Balance+Sheet&annual"        .FieldNames = True        .RowNumbers = False        .FillAdjacentFormulas = False        .PreserveFormatting = True        .RefreshOnFileOpen = False        .BackgroundQuery = True        .RefreshStyle = xlOverwriteCells        .SavePassword = False        .SaveData = True        .AdjustColumnWidth = True        .RefreshPeriod = 0        .WebSelectionType = xlSpecifiedTables        .WebFormatting = xlWebFormattingNone        .WebTables = "9"        .WebPreFormattedTextToColumns = True        .WebConsecutiveDelimitersAsOne = True        .WebSingleBlockTextImport = False        .WebDisableDateRecognition = False        .WebDisableRedirections = False        .Refresh BackgroundQuery:=False    End WithEnd Sub
查看完整描述

3 回答

?
白板的微信

TA貢獻1883條經驗 獲得超3個贊

事實證明,雅虎結束了該應用程序,網絡查詢從該應用程序中提取了數據。感謝您的所有提示。


查看完整回答
反對 回復 2019-11-20
  • 3 回答
  • 0 關注
  • 583 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號