First Error location, starting at the top of the CodeSince this is Homework our help will be to help you figure out the errors, not to correct them.With wsData
In the VBA Editor (VBIDE), Tools Menu >> Options >> Editor Tab, check every box in the Code Settings Frame.,
Then, with the Debug Menu >> Compile. Recompile after correcting each error until it successfully Compiles.
You have none, but if you did, disable all error handling code until the code Compiles.