Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto populate cell with info on other cell (Sheet) Oscar Excel Worksheet Functions 4 February 3rd 09 03:35 PM
Use a formula to populate a label from a textbox damorrison Excel Discussion (Misc queries) 5 September 4th 06 01:30 PM
What formula can i use to populate info from 2 other workheets ? vanchi233 New Users to Excel 1 February 9th 06 04:41 PM
Put Info from Clipboard to Textbox on form Tom Ogilvy Excel Programming 0 July 21st 04 05:16 PM
Put Info from Clipboard to Textbox on form keepITcool Excel Programming 0 July 21st 04 05:11 PM


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"