运行循环时自动保存文件

我有一个很长的本地网页的列表,这是由Excel 2013中的一个macrosparsing。我想知道是否有任何方法来自动保存文件每5分钟左右循环这些文件(> 9000本地.HTM文件)。

这里是一些代码:

Sub ImportFromWebPages() 'declare here some global variables For startnumber = 1 to 9126 'parse the .HTM files and extract the needed data 'while running this loop (which will take some days to finish) 'Excel should save the file every 5 or 10 minutes. Next startnumber End Sub 

对此有何想法?

在一定数量的文件之后保存可能比较容易,例如5。 请原谅我的伪代码:

 Sub ImportFromWebPages() 'declare here some global variables For startnumber = 1 to 9126 'parse the .HTM files and extract the needed data 'while running this loop (which will take some days to finish) 'Excel should save the file every 5 or 10 minutes. If startnumber Mod 5 = 0 Then ActiveWorkbook.Save End If Next startnumber End Sub 

有关Mod和ActiveWorkbook.Save的更多信息,请参阅以下链接。