在启用VBA密码保护的情况下保存时出现错误消息"Run-time Error '1004':对象‘_Workbook’的方法'SaveAs‘失败"。 这个错误消息通常是由于以下几种情况引起的: 密码错误:在启用VBA密码保护的情况下,保存文件需要输入正确的密码。如果密码错误或者未提供...
I got the error 1004. Method SaveAs of Object '_Workbook" failed.When i check the solutions that i've found, it doesn't work. I have office 365, here is my code: Sub UpdateMaandSpSite() '*** WEGSCHRIJVEN PLANNING IN PDF VORM NAAR SP SITE *** Dim NewBook...
Hello, I got the error 1004. Method SaveAs of Object '_Workbook" failed. When i check the solutions that i've found, it doesn't work. I have office 365, here is my code: Sub UpdateMaandSpS...Show More Macros and VBA Reply ...
wb.SaveAs函数上的错误1004通常是由于以下几个原因引起的: 文件路径错误:检查保存路径是否正确,包括文件名、文件格式和文件路径是否存在。 文件被占用:如果文件正在被其他程序占用,尝试关闭该程序或者将文件另存为其他位置。 权限问题:确保当前用户具有足够的权限来保存文件。如果是在受限的文件夹中保存文件,尝试将文件...
Application.ScreenUpdating = False on error resume next '忽略错误,继续执行 Dim folder As String folder = ThisWorkbook.Path & "\班级成绩表"If Len(Dir(folder, vbDirectory)) = 0 Then MkDir folder Dim sht As Worksheet For Each sht In thisworkbook.Worksheets if sht.name<>"成绩表"...
E盘 或 E:\收据\ 这个目录不存在 问题补充:“工具”菜单下“选项”对话框“安全性”选项卡中的“保存时从文件属性中删除个人信息”不要选中就没提示了
Dim afnold As String ZCanSave = True afnold = Application.ActiveWorkbook.FullName If Application.Dialogs(xlDialogSaveAs).Show = False Then Application.ActiveWorkbook.SaveAs afnold Else ActiveWorkbook.Close savechanges = False End If ZCanSave = False ...
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\b.xls"
看看ThisWorkbook.ActiveSheet.Range("P5")的值,是否为合法的文件名,是否含有非法字符
as a stand alone file and making the format .xslx which has worked for years now and 2 days ago I am starting to get an error running this code which results in a Error 1004 SaveAs"Method Saveas of object workbook failed" but if I move the file to my desktop runs with no issues?