Good morning!
I have a potentially stupid question today. I use the following macro to copy and paste data to the clipboard for pasting outside of Excel:
If I run this macro immediately after opening the Workbook it will appear as though the Workbook has been edited. It will ask to be saved upon closing, even though I never changed any data that would need a save. Make sense?
Is it possible to add something to my code to let it know that nothing has been changed by the macro?
I have a potentially stupid question today. I use the following macro to copy and paste data to the clipboard for pasting outside of Excel:
VBA Code:
Sub CopyShippingInstructions()
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("ShippingInstructions").Visible = True
Sheets("ShippingInstructions").Range("A1") = Cells(ActiveCell.Row, "B")
Sheets("ShippingInstructions").Range("E1") = Cells(ActiveCell.Row, "E")
Sheets("ShippingInstructions").Select
Range("ShippingInstructions").Select
Selection.Copy
Sheets("Calendar").Select
Sheets("ShippingInstructions").Visible = False
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
If I run this macro immediately after opening the Workbook it will appear as though the Workbook has been edited. It will ask to be saved upon closing, even though I never changed any data that would need a save. Make sense?
Is it possible to add something to my code to let it know that nothing has been changed by the macro?