Sub XL2HTML() 'http://www.herber.de/mailing/020598v.txt ' Hans W. Herber * Microsoft Excel MVP -- herber@herber.de 'Some unauthorized changes by D.McRitchie, msgbox, close' 'Modified to use selection range instead of sheet Dim r%, c%, nR%, nC% 'Worksheets(1).Select nR = Selection.Rows.Count nC = Selection.Columns.Count 'Possible additions: radio buttons, Row hdr, Col hdr, Shade hdr '(Include the default output file in browsers bookmarks/favorites) FileName = InputBox("Supply filename for HTML generated from " _ & "selected range", "Filename for XL2HTML", _ "c:\temp\XL2test.htm") Close #1 Open FileName For Output As 1 ' Print #1, "" Print #1, "
" Print #1, "" & x & " | " Next c Print #1, "