Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
works:
Set sourceRange = mybook.Worksheets(1).Rows("1:150") Set destrange = basebook.Worksheets("import").Rows(Lr) That code copies row 1-150 and paste it into the first empty row, however I want it to copy all rows that is not empty... doesn't wrok: Set sourceRange = mybook.Worksheets(1).Columns("A:K") Set destrange = basebook.Worksheets("import").Rows(Lr) I want it to copy column A-K and paste it into the first empty row |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can only copy an entire column into an entire column. If you do not
actually want to copy an entire column then refine the source range to match the range of data to be copied. -- Jim "Calle" wrote in message ... | works: | Set sourceRange = mybook.Worksheets(1).Rows("1:150") | Set destrange = basebook.Worksheets("import").Rows(Lr) | That code copies row 1-150 and paste it into the first empty row, however I | want it to copy all rows that is not empty... | | doesn't wrok: | Set sourceRange = mybook.Worksheets(1).Columns("A:K") | Set destrange = basebook.Worksheets("import").Rows(Lr) | I want it to copy column A-K and paste it into the first empty row |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!
I have tried this, but it doesnt seem to work: Set sourceRange = mybook.Worksheets(1).Rows("A1", Range("A1").End(xlDown)).EntireRow.Copy Set destrange = basebook.Worksheets("import").Rows(Lr) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe...
With myBook.Worksheets(1) Set SourceRange = .Range("A1", .Range("a1").End(xlDown)) End With Set DestRange = BaseBook.Worksheets("import").Rows(LR) SourceRange.EntireRow.Copy _ Destination:=DestRange Calle wrote: Hi! I have tried this, but it doesnt seem to work: Set sourceRange = mybook.Worksheets(1).Rows("A1", Range("A1").End(xlDown)).EntireRow.Copy Set destrange = basebook.Worksheets("import").Rows(Lr) -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get error 400.
|
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Which line?
What's in A1 of worksheet(1)? What's in the cells under A1? Calle wrote: I get error 400. -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try saving your workbook. Close excel. Open Excel, open your workbook and
try again. -- Regards, Tom Ogilvy "Calle" wrote in message ... I get error 400. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to update a column in a work based on another work sheet | New Users to Excel | |||
how can i automatically generate work order numbers from work orde | Excel Discussion (Misc queries) | |||
flash object dont work in my excel work sheet | Excel Discussion (Misc queries) | |||
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? | Excel Programming | |||
Is there away to keep "auto save" from jumping to the first work sheet in the work book? | New Users to Excel |