This will likely be more dependable than sendkeys...
<table width="100%" border="1" bgcolor="White" style="filter
rogid:DXImageTransform.Microsoft.Gradient(endColorstr='#C0CFE2', startColorstr='#FFFFFF', gradientType='0');"><tr><TD><font size="2" face=Courier New> <font color="#0000A0">Option</font> <font color="#0000A0">Explicit</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Declare</font> <font color="#0000A0">Function</font> FindWindow <font color="#0000A0">Lib</font> "user32.dll" <font color="#0000A0">Alias</font> "FindWindowA" ( _
<font color="#0000A0">ByVal</font> lpClassName <font color="#0000A0">As</font> String, _
<font color="#0000A0">ByVal</font> lpWindowName <font color="#0000A0">As</font> String) <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Declare</font> <font color="#0000A0">Function</font> ShowWindow <font color="#0000A0">Lib</font> "user32.dll" ( _
<font color="#0000A0">ByVal</font> hwnd <font color="#0000A0">As</font> Long, _
<font color="#0000A0">ByVal</font> nCmdShow <font color="#0000A0">As</font> Long) <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Const</font> SW_MAXIMIZE <font color="#0000A0">As</font> <font color="#0000A0">Long</font> = 3
<font color="#0000A0">Private</font> <font color="#0000A0">Sub</font> CWB_Click()
<font color="#0000A0">Dim</font> MyAppsWindowHandle <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
MyAppsWindowHandle = FindWindow(vbNullString, "Corporate Workbench")
<font color="#0000A0">If</font> MyAppsWindowHandle = 0 <font color="#0000A0">Then</font>
MsgBox ("You need to open application through L Bar First")
<font color="#0000A0">Exit</font> <font color="#0000A0">Sub</font>
<font color="#0000A0">Else</font>
<font color="#0000A0">Call</font> ShowWindow(MyAppsWindowHandle, SW_MAXIMIZE)
<font color="#0000A0">End</font> <font color="#0000A0">If</font>
<font color="#0000A0">End</font> <font color="#0000A0">Sub</font>
</FONT></td></tr></table><button onclick='document.all("1042006192153390").value=document.all("1042006192153390").value.replace(/<br \/>\s\s/g,"");document.all("1042006192153390").value=document.all("1042006192153390").value.replace(/<br \/>/g,"");window.clipboardData.setData("Text",document.all("1042006192153390").value);'>Copy to Clipboard</BUTTON><textarea style="position:absolute;visibility:hidden" name="1042006192153390" wrap="virtual">
Option Explicit
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32.dll" ( _
ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Private Const SW_MAXIMIZE As Long = 3
Private Sub CWB_Click()
Dim MyAppsWindowHandle As Long
MyAppsWindowHandle = FindWindow(vbNullString, "Corporate Workbench")
If MyAppsWindowHandle = 0 Then
MsgBox ("You need to open application through L Bar First")
Exit Sub
Else
Call ShowWindow(MyAppsWindowHandle, SW_MAXIMIZE)
End If
End Sub</textarea>