save workbook as cell contents and as .htm


Posted by Paul on April 24, 2001 12:07 PM

Could anyone please tell me how to modify the macro below to save the workbook as a .htm file.

The macro below is designed to save the workbook in a directory, in a cell.

Sub SaveWorkbook()

Dim FileCellName As String

FileCellName = Sheets("Test").Range("A1")

ThisWorkbook.SaveAs FileCellName & "Workbook.xls"

MsgBox "CustRef.htm was sucessfully saved"
End Sub
Thanks



Posted by Dax on April 24, 2001 12:30 PM

Change the line ThisWorkbookSaveAs.... to the following:-

ThisWorkBook.SaveAs FileCellName & ".htm",xlHtml

Dax.