Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You do not copy cells to a variable and then pass the variable. Try something
more like this... With Workbooks("TEMPLATE.xlsx") Range("A1", Cells(Rows.Count, "A").End(xlUp)).Copy _ .Worksheets.Add(After:=.Worksheets(.Worksheets.Cou nt)).Range("A1") end with -- HTH... Jim Thomlinson "Rick S." wrote: How do I pass the variable "vData"? '====== lRow = Range("A1").End(xlDown).Address 'MsgBox lRow 'for testing vData = Range("A1:" & lRow).Copy With Workbooks("TEMPLATE.xlsx") .Worksheets.Add After:=.Worksheets(.Worksheets.Count) vData.Paste 'Object required? End With '====== -- Regards VBA.Noob.Confused XP Pro Office 2007 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Selection - Paste Selection - Delete Selection | Excel Programming | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
Using a variable to determine row selection | Excel Programming | |||
Selection of variable rows | Excel Programming | |||
Variable for column selection | Excel Programming |