I have an existing macro that copies a worksheet and pastes it into another workbook, renames it and then attaches it to an email. My problem is that it pastes just the values. I need it to paste part of the original worksheet as values and part copy the formulas. So on the new workbook Columns A through F will be values only and G through Z will copy the formulas. Here is the script that I am working with. Thanks for any help.
![]()
Private Sub CommandButton2_Click() Range("A1").Select ActiveCell.SpecialCells(xlLastCell).Select Range(Selection, Cells(1)).Select Selection.Copy Workbooks.Add Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False ActiveWorkbook.SaveAs Filename:= _ "C:\flapricelist.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False 'Windows("flapricelist.xls").Activate 'Cells.Select 'Cells.EntireRow.AutoFit 'Cells.EntireColumn.AutoFit 'Cells.EntireRow.AutoFit Rem Application.CutCopyMode = False Rem Application.Dialogs(xlDialogSendMail).Show Rem ActiveWorkbook.Close Savechanges:=True End Sub











LinkBack URL
About LinkBacks
Register To Reply
.

Bookmarks