Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tg tg is offline
external usenet poster
 
Posts: 58
Default Why is this not working for me? (read message pls)


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?

"Rick Rothstein (MVP - VB)" wrote:

Try this statement...

Range("Table").Copy Worksheets("Summary").Range("G10")

Rick


"BJ" wrote in message
...
How do I copy and paste the 'contents' of a Named Range via VBA? I don't
want to copy and paste the range name.

For example, if the Named Range 'Table' is cells A1:F10 of Sheet name
'Data', how do I code in VBA the ability to paste the contents of 'Table'
into sheet name 'Summary' starting at cell G10?

Thank you.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Why is this not working for me? (read message pls)


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.

"TG" wrote:

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?

"Rick Rothstein (MVP - VB)" wrote:

Try this statement...

Range("Table").Copy Worksheets("Summary").Range("G10")

Rick


"BJ" wrote in message
...
How do I copy and paste the 'contents' of a Named Range via VBA? I don't
want to copy and paste the range name.

For example, if the Named Range 'Table' is cells A1:F10 of Sheet name
'Data', how do I code in VBA the ability to paste the contents of 'Table'
into sheet name 'Summary' starting at cell G10?

Thank you.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Why is this not working for me? (read message pls)

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Why is this not working for me? (read message pls)


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?



"TG" wrote in message
...
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?

"Rick Rothstein (MVP - VB)" wrote:

Try this statement...

Range("Table").Copy Worksheets("Summary").Range("G10")

Rick


"BJ" wrote in message
...
How do I copy and paste the 'contents' of a Named Range via VBA? I
don't
want to copy and paste the range name.

For example, if the Named Range 'Table' is cells A1:F10 of Sheet name
'Data', how do I code in VBA the ability to paste the contents of
'Table'
into sheet name 'Summary' starting at cell G10?

Thank you.




  #5   Report Post  
Posted to microsoft.public.excel.programming
tg tg is offline
external usenet poster
 
Posts: 58
Default Why is this not working for me? (read message pls)



Yes my name range is "test", I have tried that but is still gives me the
same error.. any ideas???

TIA
"Patrick Molloy" wrote:

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?



"TG" wrote in message
...
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?

"Rick Rothstein (MVP - VB)" wrote:

Try this statement...

Range("Table").Copy Worksheets("Summary").Range("G10")

Rick


"BJ" wrote in message
...
How do I copy and paste the 'contents' of a Named Range via VBA? I
don't
want to copy and paste the range name.

For example, if the Named Range 'Table' is cells A1:F10 of Sheet name
'Data', how do I code in VBA the ability to paste the contents of
'Table'
into sheet name 'Summary' starting at cell G10?

Thank you.





  #6   Report Post  
Posted to microsoft.public.excel.programming
tg tg is offline
external usenet poster
 
Posts: 58
Default Why is this not working for me? (read message pls)


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

TIA

"Patrick Molloy" wrote:

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?



"TG" wrote in message
...
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?

"Rick Rothstein (MVP - VB)" wrote:

Try this statement...

Range("Table").Copy Worksheets("Summary").Range("G10")

Rick


"BJ" wrote in message
...
How do I copy and paste the 'contents' of a Named Range via VBA? I
don't
want to copy and paste the range name.

For example, if the Named Range 'Table' is cells A1:F10 of Sheet name
'Data', how do I code in VBA the ability to paste the contents of
'Table'
into sheet name 'Summary' starting at cell G10?

Thank you.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Why is this not working for me? (read message pls)


your range name on the active sheet is "test"

so

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


should work ok



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

TIA

"Patrick Molloy" wrote:

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?



"TG" wrote in message
...
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?

"Rick Rothstein (MVP - VB)" wrote:

Try this statement...

Range("Table").Copy Worksheets("Summary").Range("G10")

Rick


"BJ" wrote in message
...
How do I copy and paste the 'contents' of a Named Range via VBA? I
don't
want to copy and paste the range name.

For example, if the Named Range 'Table' is cells A1:F10 of Sheet
name
'Data', how do I code in VBA the ability to paste the contents of
'Table'
into sheet name 'Summary' starting at cell G10?

Thank you.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read Only Message for open workbook Les Excel Programming 1 March 17th 08 07:42 PM
Eliminate Read-Write Message Magnivy Excel Programming 1 June 1st 07 09:38 PM
Skip Read-only message CV323 Excel Programming 2 April 18th 07 07:49 PM
Unable to read message jvazquezpmi Excel Discussion (Misc queries) 0 September 28th 06 04:49 PM
Message--MEMORY COULD NOT BE READ mcrmike[_3_] Excel Programming 0 July 19th 04 09:30 PM


All times are GMT +1. The time now is 09:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"