Vincent88
Active Member
- Joined
- Mar 5, 2021
- Messages
- 382
- Office Version
- 2019
- Platform
- Windows
- Mobile
I used the following script to switch to a current opened chrome but it opens a new chrome at the back. I want to enchance it by switching to currrent opened chrome (with few websites opened already) and brint it to the front. Please help to modify it. Thanks in advance.
Option Explicit
Public vPID As Variant
Public Sub OpenChrome()
If vPID = 0 Then
101:
vPID = Shell("C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe", vbNormalFocus)
Else
On Error GoTo 101
AppActivate (vPID)
End If
End Sub
Option Explicit
Public vPID As Variant
Public Sub OpenChrome()
If vPID = 0 Then
101:
vPID = Shell("C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe", vbNormalFocus)
Else
On Error GoTo 101
AppActivate (vPID)
End If
End Sub