我已经尝试了其他文章中的代码,但是在尝试将单击链接到refresh all命令时总是出现编译错误。这是我的代码。
我不确定为什么会出现问题或如何解决该问题。
Private Sub CommandButton1_Click()
Private Declare PtrSafe Function HypMenuVRefresh Lib "HsAddin" () As Long
Sub refreshWS()
Dim Count, i As Integer
i = 1
Count = Worksheets.Count
Do While i <= Count
Sheets(i).Select
MsgBox Sheets(i).Name
Call HypMenuVRefresh
i = i + 1
Loop
MsgBox "done"
End Sub
我希望Essbase刷新,但出现编译错误
“只能在End Sub,End Function或End Property之后出现注释”