Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform label set enter
I have a userform label set to a specific value copied from two cells.. can I
have an enter betwen both cells value? Me.Label5 = Range("e12").Value & Range("e13").Value I would like it to show ECR 123456 where ECR is the value in cell c12 123456 is the value in cell e13 it actualy shows ECR123456 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform label set enter
Try
Me.Label5 = Range("e12").Value & vbCrLf & Range("e13").Value Cordially, Chip Pearson Microsoft MVP 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com [email on web site] On Tue, 15 Dec 2009 12:18:01 -0800, Alberto Ast wrote: I have a userform label set to a specific value copied from two cells.. can I have an enter betwen both cells value? Me.Label5 = Range("e12").Value & Range("e13").Value I would like it to show ECR 123456 where ECR is the value in cell c12 123456 is the value in cell e13 it actualy shows ECR123456 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform label set enter
Try concatenating vbLf between them...
Me.Label5 = Range("e12").Value & vbLf & Range("e13").Value -- Rick (MVP - Excel) "Alberto Ast" wrote in message ... I have a userform label set to a specific value copied from two cells.. can I have an enter betwen both cells value? Me.Label5 = Range("e12").Value & Range("e13").Value I would like it to show ECR 123456 where ECR is the value in cell c12 123456 is the value in cell e13 it actualy shows ECR123456 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform label set enter
try this
Me.Label5 = Range("e12").Value & vbcrlf & Range("e13").Value "Alberto Ast" wrote: I have a userform label set to a specific value copied from two cells.. can I have an enter betwen both cells value? Me.Label5 = Range("e12").Value & Range("e13").Value I would like it to show ECR 123456 where ECR is the value in cell c12 123456 is the value in cell e13 it actualy shows ECR123456 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform label set enter
One more way for interest, if the cells are contiguous -
Dim dObj As DataObject Set dObj = New DataObject Range("A1:C3").Copy dObj.GetFromClipboard Me.Label1 = dObj.GetText(1) Application.CutCopyMode = False If only a few cells or non-contiguous stick with what you've got. Regards, Peter T "Alberto Ast" wrote in message ... I have a userform label set to a specific value copied from two cells.. can I have an enter betwen both cells value? Me.Label5 = Range("e12").Value & Range("e13").Value I would like it to show ECR 123456 where ECR is the value in cell c12 123456 is the value in cell e13 it actualy shows ECR123456 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform label set enter
Thanks it works great but I have one question...
What is the difference among vbCr, vbCrLf and vbLf? "Rick Rothstein" wrote: Try concatenating vbLf between them... Me.Label5 = Range("e12").Value & vbLf & Range("e13").Value -- Rick (MVP - Excel) "Alberto Ast" wrote in message ... I have a userform label set to a specific value copied from two cells.. can I have an enter betwen both cells value? Me.Label5 = Range("e12").Value & Range("e13").Value I would like it to show ECR 123456 where ECR is the value in cell c12 123456 is the value in cell e13 it actualy shows ECR123456 . |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform label set enter
I'm not completely sure of your question; see if this answers it. These are
predefined constants in VB... vbCr is a Carriage Return character (ASCII 13), vbLf is a Line Feed character (ASCII 10) and vbCrLf is two characters... a Carriage Return followed by a Line Feed. You can think of this last one like this... vbCrLf <== vbCr & vbLf Generally, for text files, the vbLf character is used as the "newline" character in UNIX and Linux operating systems; the vbCr character is used as the "newline" character in Mac computers and the vbCrLf combination of characters is used as the "newline" character sequence in Windows systems. For whatever reason, Microsoft decided to use vbLf for "newlines" in Excel cell text, MessageBoxes, Labels, etc., contrary to their own established vbCrLf convention used in Windows text files. -- Rick (MVP - Excel) "Alberto Ast" wrote in message ... Thanks it works great but I have one question... What is the difference among vbCr, vbCrLf and vbLf? "Rick Rothstein" wrote: Try concatenating vbLf between them... Me.Label5 = Range("e12").Value & vbLf & Range("e13").Value -- Rick (MVP - Excel) "Alberto Ast" wrote in message ... I have a userform label set to a specific value copied from two cells.. can I have an enter betwen both cells value? Me.Label5 = Range("e12").Value & Range("e13").Value I would like it to show ECR 123456 where ECR is the value in cell c12 123456 is the value in cell e13 it actualy shows ECR123456 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
useform label enter | Excel Discussion (Misc queries) | |||
Userform - Label | Excel Programming | |||
Userform Label | Excel Discussion (Misc queries) | |||
Userform to enter values and shown in same userform in list | Excel Programming | |||
Userform blinking label | Excel Programming |