Thread: Macro Help
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
kassie kassie is offline
external usenet poster
 
Posts: 268
Default Macro Help

Ignore the previous post, did not realise you also selected cols.

Your code is actually correct, except that you stop after copying. Why not
code in the following, and see what happens:

Range("<Your destination").Select
ActiveSheet.Paste

"Andrew T Smith" wrote:

I'm trying to make a macro that selects a given number of columns and
a variable number of rows and then copys it into a new work sheet. For
some reason no matter what i do though it never works though it always
stops at this line.

Range(selection, selection.End(xlDown)).Select

Here is the start of the macro. If you could help it would be greatly
appreciated. There isen't much here but i didn't want to program to
much more before i figured out this problem.


Andrew

Sub Macro7()
'
' Macro7 Macro
' Macro recorded 2005/03/31 by asmith2
'

'
Range("A9:E9").Select
Range(selection, selection.End(xlDown)).Select
selection.Copy
End Sub