Can you read the forum rules, please, and use code tags around any code you post?

Your problem here is likely to be because Name is a reserved word in VBA, so you shouldn't use it as a variable name.