Hi, I am just getting back into coding vb again and am researching a little to write a small program for work.
I am trying to bring data from multiple comboboxes and paste them into cells on a worksheet.
I can do this fine for singular items but when I am making a loop to input a lot of data it doesn't seem to work
I am using the following code:
Dim Modules as ComboBox
For s = 1 To 8
For p = 8 To 15
Set Module = Me.Controls.Item("ModuleBox" & s)
Worksheets("Overview").Cells(2, p).Value = Modules.Value
Next p
Next s
I have tried to google for an answer but I am probably searching the wrong info as I'm sure this isn't a niche bit of code.
Any help would be greatly appreciated!
I am trying to bring data from multiple comboboxes and paste them into cells on a worksheet.
I can do this fine for singular items but when I am making a loop to input a lot of data it doesn't seem to work
I am using the following code:
Dim Modules as ComboBox
For s = 1 To 8
For p = 8 To 15
Set Module = Me.Controls.Item("ModuleBox" & s)
Worksheets("Overview").Cells(2, p).Value = Modules.Value
Next p
Next s
I have tried to google for an answer but I am probably searching the wrong info as I'm sure this isn't a niche bit of code.
Any help would be greatly appreciated!