I am working on code to take inputted data from a userform and then paste it on a worksheet. I have a loop created to populate fields into the text boxes based on data existing in the sheet. I want to allow the user to update or add data to the text boxes and then fill back into the sheet.
I wrote a bit of code that works, but is very slow. I have used arrays before but I am rusty and I can not seem to get it to work. The code I have looks like this so far..
R = TestNo.Row
TechU = 1
Do
WDay = 1
C = 19
Do
Sheets(DataSheet).Cells(R, C).Value = UserForm2.Controls("D" & WDay & "T" & TechU).Value
WDay = WDay + 1
C = C + 1
Loop Until WDay = 16
'Stop
R = R + 1
TechU = TechU + 1
Loop Until TechU = 10
This user form has a text box that corresponds to a cell on the sheet, 6 rows tall by 16 columns wide. I want to use an array to populate the data to speed up the run time. Can anyone help me, as I said, I cant seem to get an array to populate with the text box values.
I wrote a bit of code that works, but is very slow. I have used arrays before but I am rusty and I can not seem to get it to work. The code I have looks like this so far..
R = TestNo.Row
TechU = 1
Do
WDay = 1
C = 19
Do
Sheets(DataSheet).Cells(R, C).Value = UserForm2.Controls("D" & WDay & "T" & TechU).Value
WDay = WDay + 1
C = C + 1
Loop Until WDay = 16
'Stop
R = R + 1
TechU = TechU + 1
Loop Until TechU = 10
This user form has a text box that corresponds to a cell on the sheet, 6 rows tall by 16 columns wide. I want to use an array to populate the data to speed up the run time. Can anyone help me, as I said, I cant seem to get an array to populate with the text box values.