mmercerjdcpa
New Member
- Joined
- Mar 22, 2006
- Messages
- 2
OK Folks, this one should be easy for you...
In the macro below, I am closing the workbook zzzJobReport.xlsx.
The Macro pauses and the box comes up:
"Do you want to save the changes you made...?" requiring me to answer Yes or No.
I always want to answer 'No' but want to do it in the Macro.
Tried to record it but it does not give me the info.
Question: How do I either 1st, set a parameter to not save the Workbook, or
2nd, Answer the question that comes up on the screen: "No' but inside the Macro?
Here's the code:
' Job Report:
Workbooks.Open Filename:="C:\CookStreetAllocation\zzzJobReport.xlsx"
Cells.Select
Selection.Copy
Windows("Allocation of COGS.xlsm").Activate
Sheets("Job Report").Select
Cells.Select
ActiveSheet.Paste
Application.CutCopyMode = False
Windows("zzzJobReport.xlsx").Close
Range("A1").Select
Thanks in advance for your help!!
Marty
In the macro below, I am closing the workbook zzzJobReport.xlsx.
The Macro pauses and the box comes up:
"Do you want to save the changes you made...?" requiring me to answer Yes or No.
I always want to answer 'No' but want to do it in the Macro.
Tried to record it but it does not give me the info.
Question: How do I either 1st, set a parameter to not save the Workbook, or
2nd, Answer the question that comes up on the screen: "No' but inside the Macro?
Here's the code:
' Job Report:
Workbooks.Open Filename:="C:\CookStreetAllocation\zzzJobReport.xlsx"
Cells.Select
Selection.Copy
Windows("Allocation of COGS.xlsm").Activate
Sheets("Job Report").Select
Cells.Select
ActiveSheet.Paste
Application.CutCopyMode = False
Windows("zzzJobReport.xlsx").Close
Range("A1").Select
Thanks in advance for your help!!
Marty