Home |
Search |
Today's Posts |
#12
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Steve your codes are cycling well through all the open pages and pick only
the page with the selected text to capture and display its contents down column 1. I must congratulate and thank you for your efforts to have done it in just a few steps. Is VB your background rather than VBA? I still use some programs written with Excel4 macros and like to replace them with the current Excel 11(?) macros but have not been able to get a solution from anyone. I wonder if you can help. The procedure is to read a list of names starting with A1 column1 of Document1 then goes and finds the exact name in Document2 which is a large database of person information. It then pauses to allow the user to check, edit or extract any information he/she likes before continuing when a pause button is clicked. It goes back to Document1 and reads the next name down the list. This is repeated until the whole list is read. Any help is much appreciated. "Steve Yandl" wrote in message ... Tom, Give the approach below a try. It looks at all the open pages but appends each selection to the previous collected text rather than overwrite. Sub ParseOpenWebPage() Dim strDoc As String Dim a As Integer Dim b As Integer a = Selection.Row b = Selection.Column Set objShell = CreateObject("Shell.Application") Set objShellWindows = objShell.Windows If objShellWindows.Count = 0 Then Set objShellWindows = Nothing Set objShell = Nothing Exit Sub End If strDoc = "" For i = 0 To objShellWindows.Count - 1 Set objIE = objShellWindows.Item(i) If InStr(objIE.LocationURL, "http") Then Set objSelection = objIE.Document.Selection.CreateRange() strDoc = strDoc & objSelection.Text & "," End If Next i If Len(strDoc) 0 Then arrText = Split(strDoc, ",") For r = 0 To UBound(arrText) Cells(a + r, b).Value = arrText(r) Next r End If Set objIE = Nothing Set objShellWindows = Nothing Set objShell = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Need command line to change "#DIV/0!" into a "0" (zero) | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
inserting a conditional "go to" command on a excel "if" function | Excel Worksheet Functions |