****I have Run Chrome Profile all with (url facebook) and if any chrome profile (url facebook checkpoint) record it to change text color in my sheet. Run chrome Profile all are work but it's not work with Checkpoint****
>>> use code - tags <<<
>>> use code - tags <<<
Code:
Option Explicit
Sub Runprofile()
Dim chromePath As String
chromePath = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --profile-directory=""Profile "
Dim myUrl As String
myUrl = "https://www.facebook.com"
Dim intRow As Long, LastRow As Long
With Worksheets("Data")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For intRow = 1 To LastRow
Dim myPr As String
myPr = Range("A" & intRow).Value
Dim chromePro As String
chromePro = (chromePath & "" & myPr & """ " & myUrl)
Dim wshell, oExec As Object
Set wshell = CreateObject("Wscript.Shell")
Set oExec = wshell.exec(chromePro)
Application.Wait (Now + TimeValue("0:00:05"))
'-------------Please helpme to solve this code
Dim nUrl As String
nUrl = "https://www.facebook.com/checkpoint/"
Dim nchromePro As String
nchromePro = (chromePath & "" & myPr & """ " & nUrl)
If oExec = nchromePro Then
.Range("A" & intRow).Font.Color = vbRed
Else
.Range("A" & intRow).Font.Color = vbBlack
End If
'------------------------------
Next intRow
End With
End Sub
Attachments
Last edited by a moderator: