title: VBA API declarations. Bring window to front , regardless of application
body: <p>I am trying to bring and Excel window to the front of all applications running regardless.</p>
  
  <p>Current code,</p>
  
  <pre><code>Private Declare Function SetForegroundWindow _
                       Lib "user32" _
                     (ByVal hWnd As Long) As Long
  
  Public Sub Bring_to_front()   
      SetForegroundWindow wb.Application.hWnd    
  End Sub
  Sub Test()    
       Set wb = Workbooks("MyWorkBook.xlxs")
        call Bring_to_front
  End Sub
  </code></pre>
  
  <p>At the moment nothing happens.</p>