带date的新工作簿

我想从一个macros创build一个新的工作簿,这将允许我把当前的date(最好只是一个月)放到工作簿的标题中。 这样的事情是可能的,如果是这样的话,我该怎么做?

Sub New_WB() Dim WB as Workbook Set WB = Workbooks.Add WB.SaveAs "C:/User/Test/WB name " & Format(Date,"mm") & ".xlsx" 'Fill this in with the path and name that you would like End sub 

这是通用的代码。 没有更多的信息,恐怕我不能给你更具体的代码。 这将给你两个数字的月份(如2月份的“02”,如果你想要2月份的“2月份”使用“mmm”)