Search notes:

Excel: Create comma separated values from a (selected) range

Vertical, single column selection
debug.print vba.join(application.transpose(selection.value), ",")
Horizontal, single row selection:
debug.print vba.join(application.transpose(application.transpose(selection.value)), ",")

See also

textJoin()

Index