It's because you haven't set wsWafer to anything it is a worksheet object = Nothing at the moment. I assume you want to print the name, set the worksheet first then use wsWafer.Name