以下、私は次のエラーを取得する実行しようとすると:実行時エラー1004
"This extension can not be used with the selected file type. Change the file extension in the file name text box or select a different file type by changing the save as type."
コード:エラーがActiveWorkbookが異なるファイル形式として保存しようとしていることを意味
Dim strPath As String
Dim strFolderPath As String
strFolderPath = "Y:\
strPath = strFolderPath & _
Sheet1.Range("A1").Value & _
Sheet1.Range("B1").Value & ".xlsx"
ActiveWorkbook.SaveAs Filename:=strPath
はい、excel 2007 – john
ActiveWorkbookにマクロが含まれている場合は、 "xlsm"拡張子とFileFormat:= XlFileFormat.xlOpenXMLWorkbookMacroEnabled引数を使用して名前を変更する必要があります。 –