我使用此链接中的代码从雅虎获取汇率:https://desmondoshiwambo.wordpress.com/2014/06/27/how-to-get-the-current-exchange-rateconvert-currency-in-access-excel-and-vba-using-yahoo-finance/
这非常有效。我现在唯一的挑战是在不使用Application.CalculateFull的情况下更新汇率。因为我只需要刷新范围(A2:D6)。
我尝试过使用.calculate,但它不会刷新数据。只需输入公式并按下回车键,即可计算全部工作。
有什么想法吗?
试试这个:
Sub Test()
'Application.CalculateFull
With ActiveWorkbook.Sheets("Sh1").Range("A2:D6") ' change this line as you need
.Formula = .Formula
End With
End Sub