View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Copy a value to a range of cells

Try this Terence

Sub test()
Yourstring = "Terence"
Range("a1:a10").Value = Yourstring
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Terence" wrote in message ...
Hi,

In my VBA program, I would like to put the value of a
variable to a range of cells. e.g. put the same value
from cells A1 to A10. How to do it? I tried to use Range
selection method but it doesn't work.
Anyone knows? Thanks a lot.

Terence