' exports the selected range as an html table (does not produce full html just the html table part) Sub export_table_as_html() Dim Printstring As String Dim r As Long Dim c As Long Dim WebpageName As Variant Dim WebpageFile As String WebpageName = Application.GetSaveAsFilename( _ fileFilter:="Web pages (*.html), *.html, All Files (*.*), *.*") If WebpageName = False Then Exit Sub WebpageFile = WebpageName Open CStr(WebpageFile) For Output As #1 Print #1, "
| " & Cells(r, c).Text & " | " Next Print #1, "