DaveHappyNorm
New Member
- Joined
- Jul 22, 2018
- Messages
- 15
Hello all
I have written a macro that does various things on a workbook.
The Workbook is then saved and closed using the command ActiveWorkbook.Close SaveChanges:=True
this command was working fine until I made various changes but now it now longer works.
The last bits of my macro is as follows:-
Range(Cells(22, L), Cells(33, L)).Select
Selection.Copy
Cells(22, L).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Close SaveChanges:=True
The last line of code is ActiveWorkbook.Close SaveChanges:=True which does not work, I have tried F8 but it selects the line of code and then moves to the next line of code without closing the workbook.
What would prevent the command ActiveWorkbook.Close SaveChanges:=True to not save and close the active workbook?
Can anyone help?
Thank you.
I have written a macro that does various things on a workbook.
The Workbook is then saved and closed using the command ActiveWorkbook.Close SaveChanges:=True
this command was working fine until I made various changes but now it now longer works.
The last bits of my macro is as follows:-
Range(Cells(22, L), Cells(33, L)).Select
Selection.Copy
Cells(22, L).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Close SaveChanges:=True
The last line of code is ActiveWorkbook.Close SaveChanges:=True which does not work, I have tried F8 but it selects the line of code and then moves to the next line of code without closing the workbook.
What would prevent the command ActiveWorkbook.Close SaveChanges:=True to not save and close the active workbook?
Can anyone help?
Thank you.