Dim instance As Window Dim name As String Dim timeout As Integer Dim returnValue As Window returnValue = instance.SwitchToWindowByName(name, timeout)