Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88050

Joining a range in VBA throwing type mismatch

$
0
0

Please help with this, I am trying to simply concatenate the first row of a sheet into a list separated by commas but it is throwing the type mismatch error. All values in the cells are strings and there is a value in every cell. I have tried declaring headers to a variant as well.

lc = Cells(1, Columns.Count).End(xlToLeft).column
headers = Join(Range(Cells(1, 1), Cells(1, lc)), ",")

Debug.Print headers

Viewing all articles
Browse latest Browse all 88050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>