I'm having trouble using the worksheet copy command in a VBA subroutine. I have the following line in my code:

Sheets(copySheetName).Copy Before:=Sheets(beforeSheetName)
When I step through my code and execute this line, the sheet is copied as expected and put in the correct place, but then instead of the next line of code being highlighted, the pointer jumps to the first line of a function (in a different module) in my code.

Does anyone have any thoughts on why this is happening?