自动保存将文件名保存为 "true" 或 "false"
autosave keeps saving as "true" or "false" for filename
宏有问题,它一直按照我想要的方式保存,但将文件命名为 "true" 或 "false"。注意:单元格值本身是“=today()”
Sub Macro1()
'
' Macro1 Macro
ActiveWorkbook.SaveAs Filename = Range("C6").Value
FileFormat = xlOpenXMLWorkbookMacroEnabled
CreateBackup = False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF
Filename = Range("c6").Value
FileFormat = pdf
Quality = xlQualityStandard
IncludeDocProperties = True
IgnorePrintAreas = False
OpenAfterPublish = False
End Sub
尝试Filename:=Range("c6").Text
获取单元格中显示的日期。
参数名称和参数值之间的运算符语法是 :=
。
Sub Macro1()
ActiveWorkbook.SaveAs _
Filename:=Range("C6").Text, _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
CreateBackup:=False
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=Range("c6").Text, _
FileFormat:=xlpdf, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End Sub
宏有问题,它一直按照我想要的方式保存,但将文件命名为 "true" 或 "false"。注意:单元格值本身是“=today()”
Sub Macro1()
'
' Macro1 Macro
ActiveWorkbook.SaveAs Filename = Range("C6").Value
FileFormat = xlOpenXMLWorkbookMacroEnabled
CreateBackup = False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF
Filename = Range("c6").Value
FileFormat = pdf
Quality = xlQualityStandard
IncludeDocProperties = True
IgnorePrintAreas = False
OpenAfterPublish = False
End Sub
尝试Filename:=Range("c6").Text
获取单元格中显示的日期。
参数名称和参数值之间的运算符语法是 :=
。
Sub Macro1()
ActiveWorkbook.SaveAs _
Filename:=Range("C6").Text, _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
CreateBackup:=False
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=Range("c6").Text, _
FileFormat:=xlpdf, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End Sub