The Name property, not the CodeName (string), is the index to the Worksheets collection.
Use Worksheets(Sheet1.Name).Select, not Worksheets("Sheet1").Select
(assuming that Sheet1 is the CodeName and not the Name of a worksheet).
Sheet1 is a (reference to a) Worksheet object. Think of it as a variable (an object variable) that contains a Worksheet reference.
"Sheet1" is a string that happens to be the code name of the worksheet
object Sheet1.
sheetreturn is a string variable that contains the code name of Sheet1.
If you must use sheetreturn (the string), you must use it to get the
worksheet (the object).
Function SheetCodeNamed(sCodeName as String) As Worksheet
'Returns a WORKSHEET given its codename STRING.
Dim wks As Worksheet
For Each wks In Worksheets
If wks.CodeName = sCodeName Then
Set SheetCodeNamed = wks
Exit For
End If
Next wks
End Function