Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default CopyAndPaste Object w/namechange

Hi All...........

Is it possible to copy and paste a Drawing Object, such as a Rectangle, or
whatever, and in doing the process, change the name of the Object at the
same time?............sort of a "paste-as".........

Vaya con Dios,
Chuck, CABGx3






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default CopyAndPaste Object w/namechange

Chuck,

Don't know if you consider this to be '... at the same time...'

Worksheets("Sheet1").Shapes("Oval 1").Copy
With Worksheets("Sheet2")
.PasteSpecial Format:="MS Office Drawing Object"
.Shapes(.Shapes.Count).Name = "Bob"
End With


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CLR" wrote in message
...
Hi All...........

Is it possible to copy and paste a Drawing Object, such as a Rectangle, or
whatever, and in doing the process, change the name of the Object at the
same time?............sort of a "paste-as".........

Vaya con Dios,
Chuck, CABGx3








  #3   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default CopyAndPaste Object w/namechange

Thanks for the response Bob, it looks good, but I don't seem to be able to
get it to work...........
I pasted it in to a Module, and tried, but just couldn't get it to
run.......what did I do wrong?


Sub CopyObjectRename ()

Worksheets("Sheet1").Shapes("Oval 1").Copy
With Worksheets("Sheet2")
.PasteSpecial Format:="MS Office Drawing Object"
.Shapes(.Shapes.Count).Name = "Bob"
End With
End Sub


Vaya con Dios,
Chuck, CABGx3



"Bob Phillips" wrote in message
...
Chuck,

Don't know if you consider this to be '... at the same time...'

Worksheets("Sheet1").Shapes("Oval 1").Copy
With Worksheets("Sheet2")
.PasteSpecial Format:="MS Office Drawing Object"
.Shapes(.Shapes.Count).Name = "Bob"
End With


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CLR" wrote in message
...
Hi All...........

Is it possible to copy and paste a Drawing Object, such as a Rectangle,

or
whatever, and in doing the process, change the name of the Object at the
same time?............sort of a "paste-as".........

Vaya con Dios,
Chuck, CABGx3










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
2 Label Options - Forms Object vs Control Box Object Awrex Excel Discussion (Misc queries) 3 July 17th 09 07:10 PM
Object Variable Not Set Error on Selection object Jean Excel Worksheet Functions 3 July 24th 06 06:45 PM
Range object to Array object conversion Myrna Larson[_2_] Excel Programming 1 August 1st 03 02:27 AM
Range object to Array object conversion Alan Beban[_3_] Excel Programming 0 August 1st 03 01:24 AM
Range object to Array object conversion Tom Ogilvy Excel Programming 0 August 1st 03 12:16 AM


All times are GMT +1. The time now is 02:30 AM.

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

About Us

"It's about Microsoft Excel"