We investigate the impact of school closures related to COVID-19 on the learning of 7th- and 12th-grade students in Viet Nam. To reduce COVID-19 transmission, schools were closed from 2020 to 2022, for varying periods of time across provinces. We find that 7th-grade students in provinces with longer closures were more likely to report that online learning was worse than face-to-face learning, and they also tended to report greater difficulty in understanding online lectures and communicating with friends. On the other hand, 12th-grade students in these provinces were more likely to report difficulty in interacting with teachers, and to say that they received less study-related time from family members. We do not find a significant impact of school closures on the test scores of 7th-grade or 12th-grade students. However, we find a negative association between the social lockdown duration and test scores in the high school graduation examination. An additional week of lockdown is associated with a decrease of 0.009, 0.028, and 0.011 standard deviations in test scores for mathematics, literature, and foreign languages, respectively.