Are you copying the worksheet to a new workbook? If yes, then you can do all
your editing, print it and just close that workbook. Since that workbook hasn't
been saved, you don't need to delete it.
Kind of...
Option Explicit
Sub testme()
Dim curWks As Worksheet
Dim newWks As Worksheet
Set curWks = ActiveSheet
curWks.Copy 'to a new workbook
Set newWks = ActiveSheet
With newWks
.Range("a1").Value = "hi there!"
.Range("a1:b99").PrintOut preview:=True
.Parent.Close savechanges:=False
End With
End Sub
(I used preview:=true to save some paper.)
lschuh wrote:
I have created a macro that will open the workbook, print preview, copy a
worksheet. After I create the copy I want to edit the contents then print a
range. Upon exiting I want to delete the copy I created save and close the
workbook. I have been able to do everything except do the editing in the
worksheet before the macro prints, deletes and closes. Any suggestions
--
Dave Peterson
|