I am trying to fill a range that is unknown in size, as a user can choose up to 15 items in the first set. This will be inserted into a certain row.
I have a checkbox with the following names/values:
Name Value
========== =====
chk_week1 1
chk_week2 2
... ...
... ...
chk_week15 15
For example if the user selects chk_week1, chk_week2, chk_week4 and chk_week5, then it should be inserted into the cell as 1,2,4,5.
I've included an image how it looks like to better demonstrate it:

Each checkbox has the name and value listed in the table above. Here is the code I am using so far:
Private Sub btnSubmit_Click()
Dim ws As Worksheet
Dim rng1 As Range
Set ws = Worksheets("main")
' Copy the data to the database
' Get last empty cell in column A
Set rng1 = ws.Cells(Rows.Count, "a").End(xlUp)
deptCodeSplit = Split(cbo_deptCode.Value, " ")
' Having difficulty adding the code here
' rng1.Offset(1, 6) = weeks
End Sub