concatenate column list to textbox with comma delimiter

I have a column of values (numbers) that start at G4 and could go down the column to an unpredictable length. I would like to join the cell values with a comma delimiter in a userform text box (GainTextBox) on its initialize event.
Any help would be appreciated!
Who is Participating?
Saqib Husain, SyedEngineerCommented:

Dim cel As Range
Me.GainTextBox = ""
For Each cel In Range("G4:G" & Range("G4").End(xlDown).Row)
    Me.GainTextBox = Me.GainTextBox & IIf(Me.GainTextBox = "", "", ",") & cel
Next cel
jcgrooveAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.