I am trying to bring and Excel window to the front of all applications running regardless.
Current 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
At the moment nothing happens.