View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Christian Treffler Christian Treffler is offline
external usenet poster
 
Posts: 12
Default insert cell value into string

Gary Keramidas schrieb:

ActiveCell.Value = "Wow, " & ws.Range("A1").Value & "calls in one day is
fantastic!"


I think it's better to use this code:

ActiveCell.Value = "Wow, " + ws.Range("A1").Text + "calls in one day _
is fantastic!"

AFAIR is '&' the operator for 'Binary AND'. To concat strings in VBA,
you need the '+' operator.

And I found that using the .text property of a range saves you some
hassle, if the content of the cell can be interpreted as something other
than a string.

CU,
Christian