Nitehawkhp
New Member
- Joined
- Dec 2, 2016
- Messages
- 37
I have a column of data in a worksheet and need to load that data into text boxes on a userform.
I have done this in the past, however, I can’t get the code to work in this new situation.
A sample of the worksheet data consists of the following:
<tbody>
</tbody>
I need a macro that will transfer the data into Userform
The Description column will be loaded into TextBoxes on a Userform called:
Textbox1
Textbox2
Textbox3
Textbox4
I have used the following code in a different worksheet and it works.
However, when I use it now I get a compile error
Sub or Function not defined
I have changed the sheets name to match the new worksheet and,
range name for the data.
I have looked up controls and tried to figure out what was needed for that command, but
I don't understand.
Thanks for any help you can provide me.
Rod
I have done this in the past, however, I can’t get the code to work in this new situation.
A sample of the worksheet data consists of the following:
Row | Description | Yes/No | Distance |
1 | Vendor | User Response | User Response |
2 | Category | User Response | User Response |
3 | Series | User Response | User Response |
4 | Orientation | User Response | User Response |
<tbody>
</tbody>
I need a macro that will transfer the data into Userform
The Description column will be loaded into TextBoxes on a Userform called:
Textbox1
Textbox2
Textbox3
Textbox4
I have used the following code in a different worksheet and it works.
Code:
Dim i As Integer
Sheets("Players").Select
Range("C2").Select
ToCount = Range("G2")
For i = 1 To ToCount
Controls("Player" & i) = Cells(i + 1, 3)
Next i
However, when I use it now I get a compile error
Sub or Function not defined
Code:
Dim i As Integer
Sheets("Data Validation").Select
ToCount = Range("X1").Value
For i = 1 To ToCount
Controls("Data" & i) = Cells(i + 1, 3)
Next i
I have changed the sheets name to match the new worksheet and,
range name for the data.
I have looked up controls and tried to figure out what was needed for that command, but
I don't understand.
Thanks for any help you can provide me.
Rod
Last edited: