I have a macro that open xlsx file, refresh the add-in to download data and then save. However, I cannot open that file again. When I open, Excel just appears with the gray window. I think Excel save the file as some macro-enabled format. However, it still says it is an xlsx file How do I stop this? 1. How do I save the file as in xlsx format 2. Convert the previous files (the ones that were opened and saved as some sort of macro-enabled format) to xlsx format so I can open. Based on the size of the file, there are data. Here is my code :
For Each oFile In oFolder.Files
'Set variable equal to opened workbook
myFile = oFile.Name
Set wb = Workbooks.Open(filename:=myPath & myFile)
Windows(wb.Name).Visible = False
Set cmd = Application.CommandBars("Cell").Controls("Refresh All")
cmd.Execute
DoEvents
'Ensure Workbook has opened before moving on to next line of code
wb.Close savechanges:=True
Windows(wb.Name).Visible = False
Therefore you can't see it. If you wish to see it, don't make it invisible. FYI, the format of the file, whether XLSX or XLSM, makes no difference to its appearance on your screen. – Variatus