Selected Answer
Leopard
The problem is that you're trying to use the Join function on an array and a control character.
Try this instead to get all sheet names...
Sub AllSheetNames()
Dim ShNms As String, Sh As Worksheet
For Each Sh In ThisWorkbook.Sheets 'loop through sheets in this workbook
ShNms = ShNms & Sh.Name & vbLf & vbLf 'gather names
Next Sh
MsgBox ShNms ' advise user
End Sub
or this to report a few sheets (using the ordinal references rather than specifying the names you want!):
Sub SomeSheetNames()
Dim ShNms As String, Sh As Worksheet
For Each Sh In Sheets(Array(1, 2)) 'loop through specified sheets in this workbook
ShNms = ShNms & Sh.Name & vbLf & vbLf 'gather names
Next Sh
MsgBox ShNms ' advise user
End Sub
Hope this helps.