View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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