Closing an account doesn’t undo any damage.
If you have any red marks related to your credit card — late payments, overspending, charge-offs — closing the card does not remove these from your credit records. Most negative entries will, however, fall off your report in seven years.