It looks as if that link is unique on the page so what was suggested should/could work but I cant get it to... Im not sure where it should be placed for it to do so...

The total code that I have done is as follows. It works up until the line where it says, and the section after it works in isolation but its just the clicking of the link which sits under the text View to get from one bit to another where it falls. Any ideas?


Sub PauseUsers()
Dim email As String, password As String
Dim appIE As InternetExplorer
Dim rowNum As Long
Dim lnks As Object 
Dim lnk As Object

Set appIE = New InternetExplorer

email = "removedforsecurity"
password = "removedforsecurity"

With appIE
    .navigate "removedforsecurity"
    .Visible = True
    
    Do While appIE.Busy
        Application.Wait DateAdd("s", 1, Now)
    Loop
    
    .document.getElementById("textboxUsername").Value = email
    .document.getElementById("textboxPassword").Select
    .document.getElementById("textboxPassword").Value = password
    .document.getElementById("buttonLogin").Click
    
    Do While appIE.Busy
        Application.Wait DateAdd("s", 1, Now)
    Loop
    .navigate "removedforsecurity"
    
    Do While appIE.Busy
        Application.Wait DateAdd("s", 1, Now)
    Loop
    .navigate "removedforsecurity"
    
    Do While appIE.Busy
        Application.Wait DateAdd("s", 1, Now)
    Loop
        
    rowNum = 2
    Do While Sheets("Combined").Cells(rowNum, 1).Value <> ""
    
    .document.getElementById("rbtnTypeBoth").Click
    .document.getElementById("tbEmail").Value = Sheets("Combined").Cells(rowNum, 1).Value
    .document.getElementById("ContentPlaceHolder1_rblFilterRights_0").Click
    .document.getElementById("ContentPlaceHolder1_btnFilter").Click
    

    'works up to here, then wont click the link but jumps to the line below

   
Set lnks = appIE.document.links

    For Each lnk In lnks
        If InStr(lnk.href, "mUserProfile.aspx'") > 0 Then
            Exit For
        End If 
    Next lnk

    If Not lnk Is Nothing Then
        lnk.click 
    End If



   
    .document.getElementById("ContentPlaceHolder1_divUserEditDetail").Click
        
    Do While appIE.Busy
        Application.Wait DateAdd("s", 1, Now)
    Loop
    
    .document.getElementById("radiobuttonStatusPaused").Click
    .document.getElementById("textboxPausedReason").Select
    .document.getElementById("textboxPausedReason").Value = Sheets("Combined").Cells(rowNum, 2).Value
    .document.getElementById("btnSave").Click
    
    rowNum = rowNum + 1
    Loop
    End With

  

Exit Sub
incorrectLogin:
validateLogin = "Invalid login, please try again"
Resume
End Sub