Copy a value to a range of cells

T

Terence

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
 
R

Ron de Bruin

Try this Terence

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

Terence

Thanks a lot!
-----Original Message-----
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)







.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top