I'm having trouble deleting an open excel file. I have two workbooks that are open: Filename and Filename2. Both are saved in the same location in windows explorer. The only difference between the two files is that the extension on Filename is .MHTML whereas Filename2 is .XLSM
Does anyone know why the .XLSM file is closing and the .MHTML file is not?
Thanks,
Greg
Does anyone know why the .XLSM file is closing and the .MHTML file is not?
Code:
...
Dim wb As Workbook
Set wb = Workbooks.Open(Directory & Filename)
wb.Close SaveChanges:=False
Set wb = Workbooks.Open(Directory & Filename2)
wb.Close SaveChanges:=False
...
Thanks,
Greg