Re: Simple Question (insert new line)



thisCell.Value = thisCell.Value & chr(10) & newCell.Value

in VBA, it is CHR, not CHAR

--
Regards,
Tom Ogilvy


"Joe D" <j1degiovann@xxxxxxxxxx> wrote in message
news:1122474545.924113.321840@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Currently I have code that looks something like this:
>
> thisCell.Value = thisCell.Value & " " & newCell.Value
>
> Which adds the new value to the old value, separated by a space.
> However, I would rather have this line of code insert a line break. In
> the formula bar, CHAR(10) works for this, but I tried to just replace
> the space(" ") with CHAR(10) and Excel complains about it. What is the
> correct way to insert a line break?
>
> Thanks to anyone who responds,
> Joe
>


.



Relevant Pages

  • Re: if char is number
    ... If you want to check if Char is a period ... "Tom Ogilvy" wrote in message ... > "Roman Töngi" wrote in message ... >> Regards, ...
    (microsoft.public.excel.programming)
  • Re: I need to put text in quotes(")
    ... instead of char()) ... Tom Ogilvy wrote: ...
    (microsoft.public.excel.programming)
  • Re: starting another program
    ... If you aren't using Windows 9x or Millenium, ... Regards, ... > Dim intFile As Integer ... >> Tom Ogilvy ...
    (microsoft.public.excel.programming)
  • Re: GetOpenFilename MultiSelect failure
    ... Regards, ... >> Sub Test() ... >> Tom Ogilvy ... >>> Greg ...
    (microsoft.public.excel.programming)
  • Re: starting another program
    ... > Open FileDir & FilesInPath For Input Access Read As #1 ... >> Automation help file: ... >> Regards, ... >> Tom Ogilvy ...
    (microsoft.public.excel.programming)

Loading