• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Run Chrome Profile all with url facebook if checkpoint change text color

mdamin

New Member
****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 <<<

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

  • Open Chrome Pro.xlsm
    23.4 KB · Views: 2
Last edited by a moderator:
Back
Top