ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using a userform to enter data to specific cells... (https://www.excelbanter.com/excel-programming/399813-using-userform-enter-data-specific-cells.html)

[email protected]

Using a userform to enter data to specific cells...
 
Essentially, I want to have a button trigger (which I've figured out)
a userform with Name, Date, Phone #, etc.

I've got the userform up and working after reading up on it here and
within the help files, but I'm stuck on getting the actual data from
the ComboBox/TextBox/OptionButton into specific cells in the
worksheet. What I'm looking for is a Submit button at the end of the
form to input all the data entered into it into their respective
cells.

This seems like a simple thing, but nothing I've looked for has
pointed me in the correct direction. Anyone mind giving me a hint?
Like a userform with just a TextBox for a name and how to get the data
entered into cell A7?

Thanks very, very much in advance!


Carlo

Using a userform to enter data to specific cells...
 
Hi adimax

well, basically you just need to assign the value from the textbox to the
range:
Private Sub CommandButton1_Click()
Worksheets("sheet1").Range("A1").Value = Me.TextBox1
End Sub
where CommandButton1 is your Button on the Form
Sheet1 is the target worksheet
Range("A1") is the cell you want to enter the value

and me.textbox1 is the textbox on the form

hth

Carlo


" wrote:

Essentially, I want to have a button trigger (which I've figured out)
a userform with Name, Date, Phone #, etc.

I've got the userform up and working after reading up on it here and
within the help files, but I'm stuck on getting the actual data from
the ComboBox/TextBox/OptionButton into specific cells in the
worksheet. What I'm looking for is a Submit button at the end of the
form to input all the data entered into it into their respective
cells.

This seems like a simple thing, but nothing I've looked for has
pointed me in the correct direction. Anyone mind giving me a hint?
Like a userform with just a TextBox for a name and how to get the data
entered into cell A7?

Thanks very, very much in advance!



[email protected]

Using a userform to enter data to specific cells...
 
You completely and totally rock, Carlo! That's what I was looking for.
So simple, and so perfect. Thank you so, so much. ;)

Adimax

On Oct 22, 10:25 pm, Carlo wrote:
Hi adimax

well, basically you just need to assign the value from the textbox to the
range:
Private Sub CommandButton1_Click()
Worksheets("sheet1").Range("A1").Value = Me.TextBox1
End Sub
where CommandButton1 is your Button on the Form
Sheet1 is the target worksheet
Range("A1") is the cell you want to enter the value

and me.textbox1 is the textbox on the form

hth

Carlo

" wrote:
Essentially, I want to have a button trigger (which I've figured out)
a userform with Name, Date, Phone #, etc.


I've got the userform up and working after reading up on it here and
within the help files, but I'm stuck on getting the actual data from
the ComboBox/TextBox/OptionButton into specific cells in the
worksheet. What I'm looking for is a Submit button at the end of the
form to input all the data entered into it into their respective
cells.


This seems like a simple thing, but nothing I've looked for has
pointed me in the correct direction. Anyone mind giving me a hint?
Like a userform with just a TextBox for a name and how to get the data
entered into cell A7?


Thanks very, very much in advance!




Carlo

Using a userform to enter data to specific cells...
 
You're welcome

any other questions, just post them here.

Cheers Carlo

" wrote:

You completely and totally rock, Carlo! That's what I was looking for.
So simple, and so perfect. Thank you so, so much. ;)

Adimax

On Oct 22, 10:25 pm, Carlo wrote:
Hi adimax

well, basically you just need to assign the value from the textbox to the
range:
Private Sub CommandButton1_Click()
Worksheets("sheet1").Range("A1").Value = Me.TextBox1
End Sub
where CommandButton1 is your Button on the Form
Sheet1 is the target worksheet
Range("A1") is the cell you want to enter the value

and me.textbox1 is the textbox on the form

hth

Carlo

" wrote:
Essentially, I want to have a button trigger (which I've figured out)
a userform with Name, Date, Phone #, etc.


I've got the userform up and working after reading up on it here and
within the help files, but I'm stuck on getting the actual data from
the ComboBox/TextBox/OptionButton into specific cells in the
worksheet. What I'm looking for is a Submit button at the end of the
form to input all the data entered into it into their respective
cells.


This seems like a simple thing, but nothing I've looked for has
pointed me in the correct direction. Anyone mind giving me a hint?
Like a userform with just a TextBox for a name and how to get the data
entered into cell A7?


Thanks very, very much in advance!






All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com