question

Upvotes
Accepted
7 1 2 4

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.

workspace#productexcelvba
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
84.6k 287 53 77

@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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you, @Jirapongse.

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


Thanks again!

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.