rutgermons
asked on
Excel macro, loop thru entire column/all rows
folks the below looks at column/row a1 and in colum b1 gives and output
how do i get it to do the same for the entire colum a's values and display for column b?
all help will do
Private Sub TestGetStatus()
GetStatus "A1"
End Sub
Sub GetStatus(ByVal Ref As String)
Dim HttpReq As Object
Dim Rslt As Variant
Set HttpReq = CreateObject("MSXML2.XMLHT TP")
On Error Resume Next
With HttpReq
.Open "GET", ActiveSheet.Range(Ref).Val ue, False
.Send
If Err Then
Rslt = "No connection"
Else
Rslt = Val(.Status)
If Err Then
Rslt = "No Response"
Else
Rslt = "Status: " & Rslt
End If
End If
End With
ActiveSheet.Range(Ref).Off set(0, 1).Value = Rslt
End Sub
how do i get it to do the same for the entire colum a's values and display for column b?
all help will do
Private Sub TestGetStatus()
GetStatus "A1"
End Sub
Sub GetStatus(ByVal Ref As String)
Dim HttpReq As Object
Dim Rslt As Variant
Set HttpReq = CreateObject("MSXML2.XMLHT
On Error Resume Next
With HttpReq
.Open "GET", ActiveSheet.Range(Ref).Val
.Send
If Err Then
Rslt = "No connection"
Else
Rslt = Val(.Status)
If Err Then
Rslt = "No Response"
Else
Rslt = "Status: " & Rslt
End If
End If
End With
ActiveSheet.Range(Ref).Off
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.