How to do a “Save As” in vba code, saving my current Excel workbook with datestamp?

前端 未结 7 1457
旧时难觅i
旧时难觅i 2020-12-03 07:35

I have an Excel Workbook that on form button click I want to save a copy of the workbook with the filename being the current date.

I keep trying the the following

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-03 08:27

    I know this is an old post but I was looking up something similar... I think your issue was that when you use Now(), the output will be "6/20/2014"... This an issue for a file name as it has "/" in it. As you may know, you cannot use certain symbols in a file name.

    Cheers

提交回复
热议问题