DrParmeJohnson
New Member
- Joined
- Feb 28, 2019
- Messages
- 44
Hello,
I'm trying to find a way to prompt a user to input some data that could be one thing or could be many. I've looked a bit and it seems that perhaps using a UserForm is the best way to accomplish this but, I do not know how to do that.
All I have so far is as follows.
The data the form would take would be in 3 values.
They will go into the columns as follows.
Value1 will be an id, value2 will be a description and value3 will be a qty.
Values 1,2 & 3 will be a single product and so they would have to go on the same line.
If the info can be supplied as something like "Value1,Value2,Value3" and then placed into their respective columns, that would be all that is needed.
But, sometimes there might be numerous products and I'm not sure if it is possible to take a dynamic number of inputs into the form.
I don't know if there is a way to ask "How many Add-ons do you have" [Input Number] and then generate a userform with that many input boxes or something but again, I don't know.
I have absolutely zero idea how userforms work or if it is even the best way to accomplish this but, some guidance would be appreciated nonetheless.
Please ask if there are any questions or things I left out.
Thank you.
I'm trying to find a way to prompt a user to input some data that could be one thing or could be many. I've looked a bit and it seems that perhaps using a UserForm is the best way to accomplish this but, I do not know how to do that.
All I have so far is as follows.
VBA Code:
Dim Addon As Integer
Addon = MsgBox("Are there Add-Ons?", vbQuestion + vbYesNo + vbDefaultButton2, "Add-Ons")
If Addon = vbYes Then
'Use the UserForm to collect the necessary data.
End If
The data the form would take would be in 3 values.
They will go into the columns as follows.
Value1 will be an id, value2 will be a description and value3 will be a qty.
id | Description | Qty |
pre-existing | pre-existing | pre-existing |
pre-existing | pre-existing | pre-existing |
value1 | value2 | value3 |
value4 | value5 | value6 |
Values 1,2 & 3 will be a single product and so they would have to go on the same line.
If the info can be supplied as something like "Value1,Value2,Value3" and then placed into their respective columns, that would be all that is needed.
But, sometimes there might be numerous products and I'm not sure if it is possible to take a dynamic number of inputs into the form.
I don't know if there is a way to ask "How many Add-ons do you have" [Input Number] and then generate a userform with that many input boxes or something but again, I don't know.
I have absolutely zero idea how userforms work or if it is even the best way to accomplish this but, some guidance would be appreciated nonetheless.
Please ask if there are any questions or things I left out.
Thank you.