Setting focus on Inbox

HI All,

I’ve an outline entry, when i click on that entry i’m opening a dialog box, which has OK button. On clicking OK button it should set the focus back to Inbox view. For that i wrote the following code.

Dim ws As New NotesUIWorkspace

Dim uidb As NotesUIDatabase

Set uidb = ws.CurrentDatabase

Call uidb.OpenView(“($Inbox)”, “b”,False,True)

But the problem is, it opens the Inbox view, but it throughs an error messages saying “Not a Sub or Function Calculate”. Calculate is a method in the script library which is used in one of the action bar button of Inbox.

I’m not able to figure out what is the problem.

Could you please help me out?

Thanks,

Vinod.