![]() |
Copy a value to a range of cells
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 |
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 |
Copy a value to a range of cells
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) 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 . |
All times are GMT +1. The time now is 05:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com