(Solved) – Excel VBA saving worksheet as HTML

  • by
(solved)-–-excel-vba-saving-worksheet-as-html

I am trying to save the worksheet as HTML using job number cell B2 as file name, but I am getting an error; Expected end of statement on fileFormat:=xlHTML

This is what I have:

cell = Sheets("Data").ComboBox1.Value & Range("B2").Value
Fpath = "C:Data"
fname = Fpath & cell & ".html"
ActiveWorkbook.SaveCopyAs Filename:=fname FileFormat:=xlHtml

Can anyone give me a pointer on where the problem is?

Thank you in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *