Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy a range of cells repeatedly | Excel Worksheet Functions | |||
Copy certain range of cells | Excel Discussion (Misc queries) | |||
How to use macros to copy a range of cells which can exclude some cells which I didn't want to be copied? | Excel Worksheet Functions | |||
Copy Range of Cells in Same Row | Excel Discussion (Misc queries) | |||
Copy cells into range of cells until cell change | Excel Worksheet Functions |