Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a sheet called DrListWorkCopy which data i would like to duplicate in
DrListWorkCopy1. DrLIstWorkCopy1 exists as an empty sheet with headers on row 1 identical to DrLIstWorkCopy. The Macro works well when there is data in DrListWorkCopy. However, in the occasion when DrListWorkCopy happen to have no data in it, the macro coppies the headers and paste it onto DrListWorkCopy1. How do I prevent that? I think it has got to do with how I coded the last empty row in DrListWorkCopy1. The codes are as follows: Dim SourceWks As Worksheet Dim TargetWks As Worksheet Set SourceWks = Sheets("DrListWorkCopy") Set TargetWks = Sheets("DrListWorkCopy1") SourceWks.Range("A2:AS" & SourceWks.Range("AS65536").End(xlUp).Row).Copy TargetWks.Select Range("A2").Select TargetWks.Paste Would appreciate some help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Paste problem | Excel Discussion (Misc queries) | |||
Copy and paste problem | Excel Discussion (Misc queries) | |||
Copy and Paste Problem | Excel Discussion (Misc queries) | |||
copy paste problem? | Excel Discussion (Misc queries) | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) |