去公式,应该有一个复制——选择性粘贴——数值的步骤
你只复制了,没粘贴就保存了,当然是相当于什么也逗空没做
Sub 发货单()
'fileSaveName = Application.GetSaveAsFilename()
fileSaveName = Application.GetSaveAsFilename("发扮脊货单" & Range("d17") & Range("d18") & ".xls")
If fileSaveName <> False Then
Sheet1.cells.Copy
Sheet1.[a1].PasteSpecial Paste:=xlPasteValues '选择性粘贴数值山缺瞎
'ActiveWorkbook.SaveAs Filename:=fileSaveName & ".xls"
ActiveWorkbook.Close SaveChanges:=True, Filename:=fileSaveName & ".xls"
Sheet1.Select
End If
End Sub
Sheets("Sheet1").Select
Selection.Copy
Sheets("Sheet2"搜首).Select
' Range("A1"世卜数).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' Range("D6").Select
楼主这个没有粘贴的代码啊,以上弊弊是将sheet1的value复制到sheet2,希望能够帮到你~
Sub 发货单州胡()
fileSaveName = Application.GetSaveAsFilename("发货单" & Range("d17") & Range("厅迹哗d18") & ".xls")
If fileSaveName <> False Then
Sheet1.Cells.Copy
Workbooks.Add
Range("A1"扮行).PasteSpecial Paste:=xlPasteValuesAndNumberFormats
ActiveWorkbook.Close SaveChanges:=True, Filename:=fileSaveName
End If
End Sub