-
KB Search Update
For anyone who uses the Excel KB Search item, the table number has changed from 12 to 14 in this part of the code.
[VBA]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
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules