我正在尝试在 excel 中创建一个“评论”,它将显示突出显示的任何单元格的 Bloomberg BDP 信息。例如,假设 active.cell = IBM 并且我“悬停”在 IBM 上。我希望弹出一个评论框,显示相关的市场数据。
$bid = "=BDP(active.cell &" US EQUITY","BID_ALL_SESSION")"
$bidsize = "=BDP(active.cell &" US EQUITY","BID_SIZE_ALL_SESSIONS_RT")"
$ask = "=BDP(active.cell &" US EQUITY","ASK_ALL_SESSION")"
$asksize = "=BDP(active.cell &" US EQUITY","ASK_SIZE_ALL_SESSIONS_RT")"
$last = "=BDP(active.cell &" US EQUITY","LAST_ALL_SESSIONS")"
$lastsize = "=BDP(active.cell &" US EQUITY","TRADE_SIZE_ALL_SESSION_RT")"
在 'blah' 我想要 ($bidsize $bid $ask $asksize $last $lastsize)
我开始偷看,在下面发现了一些东西,但不知道如何实现。有任何想法吗?
Sub add-comments()
Dim rcell As Range
For Each rcell In Range("B2:B48")
If rcell.Value <> "" Then
rcell.AddComment
rcell.Comment.Text 'blah'
End If
Next
End Sub
感谢观看