ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Interacting with IE (https://www.excelbanter.com/excel-programming/320303-interacting-ie.html)

pablo

Interacting with IE
 
I am a novice and not exactly sure how to get this started. I have an excel
worksheet with a list of URLs in one column. I am wanting to check, insert
the URLs into the IE address field, and then return the page name.

Any ideas?

Thanks,
Pablo

Lonnie M.

Interacting with IE
 
Hi,
This assumes that the URL's are in Column 'A':

Public Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range,
Cancel As Boolean)
Dim C%
Dim SelectedCol$, SelectedRow$
Cancel = True
SelectedCol = Left(Target.Address(False, False), 1)
SelectedRow = Target.Row
Select Case SelectedCol
Case "A"
C = 1
Case Else
C = 0
End Select

If C = 1 Then
ThisWorkbook.FollowHyperlink Address:= _
ThisWorkbook.Path & Cells(SelectedRow, 1)
Else
Cells.Rows.Hidden = False
End If
End Sub

HTH--Lonnie M.


CodeSponge

Interacting with IE
 
This should do what you want



Set IE = CreateObject("InternetExplorer.Application")
Set worklist = Selection.EntireRow.Rows

With IE
..Visible = True
..silent = True

'Work the list
For Each ticket In worklist
..Navigate "Some webpage"
Do Until Not IE.Busy And IE.readyState = 4 ' 4 ==
READYSTATE_COMPLETE
DoEvents
Loop

'Set Solution ID
your_cell = .Document.Body.Title.Value
Next
End With


Lonnie M.

Interacting with IE
 
oops,
ThisWorkbook.FollowHyperlink Address:= _
ThisWorkbook.Path & Cells(SelectedRow, 1)

should be:
ThisWorkbook.FollowHyperlink Address:= Cells(SelectedRow, 1)


pablo

Interacting with IE
 
Thanks for the info. I am getting a syntax error "..Visible = True" when I
place the code in a sub routine and run it. Is there anything I need to do
to set this up?

"CodeSponge" wrote:

This should do what you want



Set IE = CreateObject("InternetExplorer.Application")
Set worklist = Selection.EntireRow.Rows

With IE
..Visible = True
..silent = True

'Work the list
For Each ticket In worklist
..Navigate "Some webpage"
Do Until Not IE.Busy And IE.readyState = 4 ' 4 ==
READYSTATE_COMPLETE
DoEvents
Loop

'Set Solution ID
your_cell = .Document.Body.Title.Value
Next
End With




All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com