Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate a cell with TextBox info
I want to populate a specific cell with information entered on my userform in
Textbox1. It will always be the same cell so I will not need to put new input on next line. Thank you in advance for your help. -- Sony |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate a cell with TextBox info
Hi Sony
on the OK button of the userform the code would look something like this Sheets("Sheet1").Range("A1").value = textbox1 Hope this helps Cheers JulieD "Sony" wrote in message ... I want to populate a specific cell with information entered on my userform in Textbox1. It will always be the same cell so I will not need to put new input on next line. Thank you in advance for your help. -- Sony |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate a cell with TextBox info
Assume that you have a command button (CommandButton1) on the same user form,
place the folowing code in the Declarations portion of your form: Private Sub CommandButton1_Click() Dim rRargetCell As Range Set rtargetcell = ThisWorkbook.Sheets("Sheet1").Range("a1") c.Value -TextBox1.Value End Sub Regards, Alasdair Stirling "Sony" wrote: I want to populate a specific cell with information entered on my userform in Textbox1. It will always be the same cell so I will not need to put new input on next line. Thank you in advance for your help. -- Sony |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate a cell with TextBox info
I believe you meant it will not always be the same cell. Assume textbox1 is
on a Userform Private Sub TextBox1_Exit(ByVal Cancel _ As MSForms.ReturnBoolean) Dim rng as Range With worksheets(1) set rng = .cells(rows.count,1).End(xlup) End with if not isempty(rng) then set rng = rng.offset(1,0) rng.value = Textbox1.Value End sub Assumes you will want to start in A1 of sheet1 and progress down the column. -- Regards, Tom Ogilvy "Sony" wrote in message ... I want to populate a specific cell with information entered on my userform in Textbox1. It will always be the same cell so I will not need to put new input on next line. Thank you in advance for your help. -- Sony |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate a cell with TextBox info
Thank you Julie that was exactly what I needed
"Sony" wrote: I want to populate a specific cell with information entered on my userform in Textbox1. It will always be the same cell so I will not need to put new input on next line. Thank you in advance for your help. -- Sony |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate a cell with TextBox info
Why not just use the controlsource (userform) property to link the textbox
to the cell. -- Regards, Tom Ogilvy "Sony" wrote in message ... Thank you Julie that was exactly what I needed "Sony" wrote: I want to populate a specific cell with information entered on my userform in Textbox1. It will always be the same cell so I will not need to put new input on next line. Thank you in advance for your help. -- Sony |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto populate cell with info on other cell (Sheet) | Excel Worksheet Functions | |||
Use a formula to populate a label from a textbox | Excel Discussion (Misc queries) | |||
What formula can i use to populate info from 2 other workheets ? | New Users to Excel | |||
Put Info from Clipboard to Textbox on form | Excel Programming | |||
Put Info from Clipboard to Textbox on form | Excel Programming |