Why is this not working for me? (read message pls)

  • Thread starter Thread starter TG
  • Start date Start date
T

TG

I am in need of exactly what "BJ" wants, it seems to work for him but when I
use it an error message " Invalid Outside procedure" appears and it hight
lights ("G10") in

Range("A").Copy Worksheets("five").Range("G10")

any Ideas as to why this will not work for me?

I am using excel 2007

Thank you in advance,

..............................................................................
Thanks Rick - worked great - but I forgot to mention that I need to transpose
the data. How do I work in the PasteSpecial code?
 
what does Range("A") refer to? Excedl uses this to refer to column A. It
also could be a named range. The original code used TABLE as a named range.
 
Hi TG

You are trying to put a whole column into one cell. Also if you want
to copy all of Column A you need to use Range("A:A"). You could paste
this column into G1 as it will place the whole column in G but not to
G10.

Better to choose a used range in Column A, then paste it into Column
G10. Here is an example. Copies the used range in Col A to G10 in
sheet 5.

Take care

Marcus


Sub Copyit()
Dim Lw As Integer
Lw = Range("A" & Rows.Count).End(xlUp).Row
Range("A1:A" & Lw).Copy Worksheets("five").Range("G10")
End Sub
 
Range("A") be Range("A:A") , but you CANNOT COPY AN ENTIRE COLUMN TO A
CELL
so "A" is probably a named range? do you have one?
 
Yes my name range is "test", I have tried that but is still gives me the
same error.. any ideas???

TIA
 
Yes I do have a range that is named "test" and its from A1:F5.. how can I
make this work?

TIA
 
your range name on the active sheet is "test"

so

Range("test").Copy Worksheets("five").Range("G10")


should work ok
 
Back
Top