Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Userform Textbox writing to a cell

I am having trouble with using a textbox inside of a
userform and having the value entered into the textbox
transferred to a specific excel cell. I'm am new at this
programming, and purchased a great book on VBA in Excel.
However, the book seems to just skip this detail. Any
help would be appreciated, thanks.
Rich

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Userform Textbox writing to a cell

Rich,

Worksheets("Sheet1").Range("A1").Value = TextBox1.Value

The above (when run) will copy whatever is in TextBox1 to
Sheet1, Cell A1 (modify to suit your needs).

Post back if you need more help with this.

John



Rich wrote:

I am having trouble with using a textbox inside of a
userform and having the value entered into the textbox
transferred to a specific excel cell. I'm am new at this
programming, and purchased a great book on VBA in Excel.
However, the book seems to just skip this detail. Any
help would be appreciated, thanks.
Rich


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Userform Textbox writing to a cell

Rich,

I'm confused by your code??
Is MealTanks the UserForm that your TextBox is on???
Or are you callin MealTanks from another UserForm??

If that's the case, place your MealTanks.Show command
after your Worksheets("Sheet1").Range("C25").Value =
TextBox1.Value command.

If it's a CommandButton on a Worksheet, calling MealTanks,
then you need a way to get whatever value is entered into TextBox1
back to the cell.
To do this, you could add a CommandButton to the UserForm
Code it as such:

Private Sub CommandButton1_Click()
Worksheets("Sheet1").Range("C25").Value =TextBox1.Value
Unload MealTanks
End Sub

Post back if you have more questions on this.
(and give me a little bit more of a description of what you have
and what you're trying to do)

John

Rich wrote:

I really appreciate your help!!!
Thanks, that is what I had. It must be somthing else. I
have a command buttom posted in excel and this is its
code.

Private Sub CommandButton2_Click()
MealTanks.Show

Worksheets("Sheet1").Range("C25").Value =
TextBox1.Value

End Sub

The continue button on the userform is using the hide
command. From what I understand if I use the unload
command the value in the cell will get erased.

It is still not writing to the cell??? Do I need more
code? Thanks!

-----Original Message-----
Rich,

Worksheets("Sheet1").Range("A1").Value = TextBox1.Value

The above (when run) will copy whatever is in TextBox1 to
Sheet1, Cell A1 (modify to suit your needs).

Post back if you need more help with this.

John



Rich wrote:

I am having trouble with using a textbox inside of a
userform and having the value entered into the textbox
transferred to a specific excel cell. I'm am new at

this
programming, and purchased a great book on VBA in

Excel.
However, the book seems to just skip this detail. Any
help would be appreciated, thanks.
Rich


.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Userform Textbox writing to a cell

rich,

Thanks a million. This help group is great!!!

I take it that means your problem is solved????
And, if so, you're quite welcome.

John

rich wrote:

Thanks a million. This help group is great!!!


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
Userform with textbox displaying Cell B1 Value JMay Excel Discussion (Misc queries) 2 October 4th 09 12:56 AM
Add COUNTIF TO USERFORM TEXTBOX Richhall[_2_] Excel Worksheet Functions 4 September 16th 09 11:43 AM
writing data to a textbox in a chart CLamar Excel Discussion (Misc queries) 0 July 21st 06 02:57 PM
userform textbox Phil Excel Worksheet Functions 5 January 16th 05 06:59 PM
Populating Textbox in UserForm Derek[_2_] Excel Programming 3 July 10th 03 10:41 PM


All times are GMT +1. The time now is 03:55 PM.

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"