Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cannot copy a worksheet within a workbook | Excel Discussion (Misc queries) | |||
HOW DO I COPY A CONDITIONAL SUM (sumif) AND EDIT IT? (THE SUM NEV. | Excel Worksheet Functions | |||
How do I copy my dropdown box with data to another worksheet? | Excel Worksheet Functions | |||
Date macro | Excel Discussion (Misc queries) | |||
How do I edit, copy and paste text in excel cells? | New Users to Excel |