excel - 当我将 excel 版本更改为 excel 2016 时出现错误运行时间 1004 vba
问题描述
我需要你的帮助。在我们公司,我们的 excel 文件存在问题,因为我们更改了 excel 版本并下载了 excel 2016,我们遇到了错误 1004。
在其他计算机上它工作得很好。
Private Sub SauvValid()
'-------------------------------------------------------------------------
' SAUVEGARDE DANS LE REPERTOIRE SPECIAL DE SAUVEGARDE
'-------------------------------------------------------------------------
' sauvegarde du fichier dans l'emplacement de sauvegarde mensuelle
nomFichier = Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 18)
repertoireSauv = ThisWorkbook.Path & "\"
repertoire = ThisWorkbook.Path & "\" & Format(Sheets("Calcul Indexe").Range("B1").Value, "yyyy") & "\" & _
Format(Sheets("Calcul Indexe").Range("B1").Value, "mm") & "-" & Format(Sheets("Calcul Indexe").Range("B1").Value, "mmmm") & "\"
Call GESTION_DROITS.Masquage
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=repertoire & nomFichier & "SvEnvoiValid-" & _
Format(Sheets("Calcul Indexe").Range("B1").Value, "yyyymmdd") & "-" & Format(Time, "hhmm") & ".xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
' sauvegarde du fichier de façon normale incrementale
nomFichier = nomFichier & Format(Sheets("Calcul Indexe").Range("B1").Value, "yyyymmdd") & "-" & Format(Time, "hhmm") & ".xlsm"
ChDir repertoireSauv
ActiveWorkbook.SaveAs Filename:=repertoireSauv & nomFichier, _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
Application.DisplayAlerts = True
Call GESTION_DROITS.Affichage
End Sub
解决方案
推荐阅读
- html - 只有在外部单击时才会选择复选框输入
- python - 在 python 中使用 str.contains(),当它完美匹配字符串并且仍然没有得到输出时
- java - 转换一个可选
- > 到另一个可选
- > 在 Java 中
- javascript - 将y轴上的零与chartjs中折线图的x轴上的标签对齐
- angular - 工作区中未设置配置“生产” - Angular
- php - 阵列回声问题
- html - SVG
当我用作背景图像时没有加载 - angular - 如何修复装饰器 @HostListener 的 no-unsafe-any
- python - 如何在 Python 中使用 selenium 从 Chrome 获取当前 URL
- python - 提取 Yelp 评分评论