发布网友 发布时间:2022-05-05 01:46
共1个回答
热心网友 时间:2023-10-09 09:00
ThisWorkbook.Path 改成你需要的路径就可以了,比如改成 “C:",就在C盘根目录下追问大神能否就在我的原代码上改下,我刚刚改了下貌似不行。列如:保存在E盘(计划单)文件夹里。追答Private SubCommandButton1_Click()
Sheet1.Copy
Workbooks(Windows(Windows.Count).Index).Close True, "e:\计划单\" & Format(Now(), "库内调车yyyy" & "年" & "mm" & "月" & "dd" & "日" & "h" & "时" & "mm" & "分" & "ss" & "秒") & ".xls"
End Sub