Save excel sheet as html file similar to save as

7 views
0

I have a multiple sheet excel workbook want to save one sheet as a html file using VBA.

It should be like save as operation when do manual save as the format in the excel is displaying in the saved HTML file but when try to do this using VBA or macro the file is got saved but format got lost.

Application.Sheets("MNM Report").Activate
ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:="D:Reports9192014mnm.html"

help me out how to do this functionality with out loosing the format in the excel in other words i need to perform save as option using vba.