Hello all,
I'm having trouble dealing with a .MHTML workbook. This workbook opens automatically from as report generated from an ERP system. My end goal is to activate this .MHTML that opens and then save it as a .xlsx file.
Here's what I have so far. However I get a subscript out range error on the first line. I have checked and the name of the workbook that opens up is indeed "qmMMData.MHTML"
I'm having trouble dealing with a .MHTML workbook. This workbook opens automatically from as report generated from an ERP system. My end goal is to activate this .MHTML that opens and then save it as a .xlsx file.
Here's what I have so far. However I get a subscript out range error on the first line. I have checked and the name of the workbook that opens up is indeed "qmMMData.MHTML"
VBA Code:
Dim FName As String
Dim FPath As String
With Windows("qmMMData.MHTML")
Windows("qmMMData.MHTML").Activate
FPath = ActiveWorkbook.path
FName = "qmMMData"
ActiveWorkbook.SaveAs filename:=FPath & "\" & FName & ".xlsx"
End With