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


I am using the following code to get info from a cell in my spreadshee
and add it to my userform textbox:


Code
-------------------

Private Sub CommandButton2_Click()
TextBox2.Text = Range("A12").Value
End

-------------------


-Problem-
I need to have the information from cells 'A12 & E12' inserted in th
textbox and then separated by a comma(,).

Can some one help me with the code for this.

Thank you for your support

--
oberon.blac
-----------------------------------------------------------------------
oberon.black's Profile: http://www.excelforum.com/member.php...fo&userid=2673
View this thread: http://www.excelforum.com/showthread.php?threadid=46838

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Textbox Info


Good evening oberon.black

This line should do the trick.

TextBox2.Value = Range("A12") & "," & Range("E12")

HTH

Dominic

--
dominic
-----------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...fo&userid=1893
View this thread: http://www.excelforum.com/showthread.php?threadid=46838

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Textbox Info


Like a charm. But tell me why do I remove the .value

--
oberon.blac
-----------------------------------------------------------------------
oberon.black's Profile: http://www.excelforum.com/member.php...fo&userid=2673
View this thread: http://www.excelforum.com/showthread.php?threadid=46838

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Textbox Info

You want to use:

TextBox2.Value = Range("A12").Value & "," & Range("E12").Value

???

I like to use that syntax, too. .Value is the default property a range object
(so it's not always required).

But I think it makes for better reading/coding to always use the property you
want. You never have to worry about which property you meant.



"oberon.black" wrote:

Like a charm. But tell me why do I remove the .value?

--
oberon.black
------------------------------------------------------------------------
oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732
View this thread: http://www.excelforum.com/showthread...hreadid=468380


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Textbox Info


Ok, Thanks


--
oberon.black
------------------------------------------------------------------------
oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732
View this thread: http://www.excelforum.com/showthread...hreadid=468380



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
Storing TextBox info in cells, then retrieving on next load-up jlroper[_2_] Excel Programming 2 September 2nd 05 06:09 AM
Storing TextBox info in cells, then retrieving on next load-up T-®ex[_48_] Excel Programming 0 August 31st 05 07:51 AM
Populate a cell with TextBox info Sony Excel Programming 5 November 1st 04 04:00 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 05:01 PM.

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

About Us

"It's about Microsoft Excel"