Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
why doesn't that piece of code work: table1.range("B19","C19") = table1.range("A2","B2") or table1.range("B19:C19") = table1.range("A2:B2") both do not work. I want to copy the content from table5 at A2:B2 to table1 at B19:C19 when I only select one cell, like this: range("A2"), it works great. thanks for your help Simon |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Simon,
Try this Range("B19:C19").Value = Range("A2:B2").Value -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Simon Sunke" wrote in message ... hi why doesn't that piece of code work: table1.range("B19","C19") = table1.range("A2","B2") or table1.range("B19:C19") = table1.range("A2:B2") both do not work. I want to copy the content from table5 at A2:B2 to table1 at B19:C19 when I only select one cell, like this: range("A2"), it works great. thanks for your help Simon |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I didn't test your code to figure out why it doesn't work,
but here's some code that will work (adjust accordingly): -------- Begin Code -------- Dim rng As Range Set rng = ActiveSheet.Range("A2:B2") rng.Copy ThisWorkbook.Worksheets("Sheet2").Range("B19:C19") Set rng = Nothing -------- End Code -------- This code assumes that the worksheet with the A2:B2 range is the active one at the time of its execution. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range Question | Excel Discussion (Misc queries) | |||
Range Question | Excel Discussion (Misc queries) | |||
range question | Excel Programming | |||
Range Question | Excel Programming | |||
Range.Formula and Range question using Excel Automation | Excel Programming |