On Jun 20, 7:47*pm, Len <ltong2000...@yahoo.co.uk> wrote:
> On Jun 20, 5:13*pm, "Snake Plissken" <vico11wywal...@poczta.onet.pl>
> wrote:
>
>
>
>
>
> > It seems that the destination sheet must have at least 2 rows of data.
> > Otherwise macro tries to select the very bottom of the sheets and them paste
> > data below it *- which is of course impossible
> > Run macro step by step (F8) then you'll see what's going on
>
> > I have changed the code to omit the problem somehow but it can be done in a
> > a better wa I suppose
>
> > Sub test()
> > 'it should be run from source sheet
>
> > * * Range("A1").End(xlDown).Select
> > * * Selection.CurrentRegion.Select
> > * * Selection.SpecialCells(xlCellTypeVisible).Select
> > * * Selection.Copy
> > * * Sheets("Exp_Grp").Select
> > * * Range("A1").End(xlDown).Select
> > * * Selection.CurrentRegion.Select
> > * * If Selection.Rows.Count > 1 Then
> > * * * * Range("A1").End(xlDown).Select
> > * * * * ActiveCell.Offset(5, 0).Select
> > * * * * ActiveSheet.Paste
> > * * Else
> > * * * * Range("A1").Select
> > * * * * ActiveCell.Offset(5, 0).Select
> > * * * * ActiveSheet.Paste
>
> > * * End If
>
> > * * Application.CutCopyMode = False
>
> > End Sub
>
> Hi
>
> Based on your new codes and run F8 step by step going thro the macro,
> the same error message prompts at ActiveSheet.Paste and it stops
>
> It seems that the selected range from A3 to O97 ( ie row
> 3,22,26,29,33,39,45,47,49,55,57,59,61,97 ) is unable to copy over and
> it hangs at that worksheet
>
> Regards
> Len- Hide quoted text -
>
> - Show quoted text -
One more thing, the macro copies the selected range from A3 to O97 and
move to cell A3 and it stops when it hit the code "
Range("A1").End(xlDown).Select and ActiveCell.Offset(5, 0).Select"
|