Refreshing a Specific Worksheet on Workspace VBA

Having difficulty with using the Application.Run "WorkspaceRefreshWorksheet" VBA function on Workspace. I found the information below on refreshing worksheets:

2 - EikonRefreshWorksheet takes a third optional parameter worksheetToRefresh. This is the name of the worksheet to refresh. It can be in "[Book1]Sheet1" format to refresh a sheet in a workbook that isn't in the foreground. Or just "Sheet1" which will look for the sheet in the ActiveWorkbook.


But still getting an error when running the code below:

Dim curvesbook_USD As String

curvesbook_USD = ActiveWorkbook.Name

Call Application.Run("WorkspaceRefreshWorksheet", True, 10000, CStr("[" & curvesbook_USD & "]" & "ReutersUSD_hist"))


Does "WorkspaceRefreshWorksheet" allow for a third parameter to assign a worksheet name like on "EikonRefreshWorksheet"?


Thank you.

Best Answer

  • Jirapongse
    Answer ✓

    @Alex.Conti

    Thank you for reaching out to us.

    I have done a quick test andn found that WorkspaceRefreshWorksheet supports the third parameter.

    Sub WSRefreshSheet()
        DoEvents
        Application.Run "WorkspaceRefreshWorksheet", True, 120000, "Sheet1"
        DoEvents
    End Sub

    However, please contact the Workspace Excel support team directly to confirm it.

Answers

  • Thank you, @Jirapongse.

    By any chance, can you share a WorkspaceRefreshWorksheet sample that uses the "[Book1]Sheet1" parameter?


    Thanks again!