I have about 50 web sites I get info from daily. The address format is www.sampleaddress.com/symbol where the address is this for each site except symbol represents 3 or 4 letters for each specific site. I had been having a problem finding a method that would open the sites. I found Juan's method here which will open the sites. This is his method:
Sub Test()
Const url As String = "www.mrexcel.com/board2" ' ****** the address is obtained from another macro
Dim ie As Object
'Dim document As Object
Set ie = CreateObject("internetexplorer.application")
With ie
.Visible = True
.Navigate url
Do While .ReadyState <> 4
DoEvents
Loop
.ExecWB 17, 2
.ExecWB 12, 2
ActiveSheet.Paste Range("A1")
End With
End Sub
However, I am not able to use a variable with the address. He states that a macro should be used to enter the address. I have tried to find documentation on how to modify a macro with another macro to no avail. I do not understand how to do this. Can anybody help or send me in a direction where I can find out how to do this? Thanks for any help you can provide. Frank
Sub Test()
Const url As String = "www.mrexcel.com/board2" ' ****** the address is obtained from another macro
Dim ie As Object
'Dim document As Object
Set ie = CreateObject("internetexplorer.application")
With ie
.Visible = True
.Navigate url
Do While .ReadyState <> 4
DoEvents
Loop
.ExecWB 17, 2
.ExecWB 12, 2
ActiveSheet.Paste Range("A1")
End With
End Sub
However, I am not able to use a variable with the address. He states that a macro should be used to enter the address. I have tried to find documentation on how to modify a macro with another macro to no avail. I do not understand how to do this. Can anybody help or send me in a direction where I can find out how to do this? Thanks for any help you can provide. Frank