Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Storing TextBox info in cells, then retrieving on next load-up | Excel Programming | |||
Storing TextBox info in cells, then retrieving on next load-up | Excel Programming | |||
Populate a cell with TextBox info | Excel Programming | |||
Put Info from Clipboard to Textbox on form | Excel Programming | |||
Put Info from Clipboard to Textbox on form | Excel Programming |