BringWindowToTop

flaviu123

New Member
Joined
Aug 20, 2014
Messages
44
Hello! Please help me with a VBA code to find chrome tab containing the URL "http://www.bet365.com/home/FlashGen4/WebConsoleApp.asp?cb=1058021705547511577" and to bring to front in format maximize. I found a code but do not know how we adapt. Thank you in advance!


<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">Declare Function FindWindow Lib "User32.dll" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long
Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Long

Public Sub Test()
Dim ClassName As String
Dim WindowName As String
Dim hwnd As Long
Dim Ret As Long
ClassName
= "IEFrame" 'You would use "Chrome_WidgetWin_1"
WindowName
= vbNullString
hwnd
= FindWindow(ClassName, WindowName)
Ret BringWindowToTop
(hwnd)
End Sub</code>
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Did you ever get an answer to this question? I'm having a similar problem.
 
Upvote 0

Forum statistics

Threads
1,214,967
Messages
6,122,503
Members
449,090
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top