PDA

View Full Version : KB Search Update



mdmackillop
03-21-2008, 07:59 AM
For anyone who uses the Excel KB Search item (http://vbaexpress.com/kb/getarticle.php?kb_id=818), the table number has changed from 12 to 14 in this part of the code.

Sub gethtmltable()
Dim objWeb As QueryTable

With Sheets("KBItems")
.Range("A:C").ClearContents
Set objWeb = .QueryTables.Add( _
Connection:="URL;http://www.vbaexpress.com/kb/kblist.php", _
Destination:=.Range("A1"))
With objWeb
.WebSelectionType = xlSpecifiedTables
.WebTables = "14" ' Identify your HTML Table here
.Refresh BackgroundQuery:=False
.SaveData = True
End With
.Range("B1").ColumnWidth = 30
.Range("C1").ColumnWidth = 40
.Columns("B").Font.ColorIndex = 5
.Columns("B").Font.Underline = xlUnderlineStyleSingle
End With
Set objWeb = Nothing
End Sub