PC Review


Reply
Thread Tools Rate Thread

Changing Picture Number when cutting and pasting

 
 
DonFlak@gmail.com
Guest
Posts: n/a
 
      10th Oct 2007
I am using a macro to copy and paste an image from one workbook to
another. When I copy the image from Workbook A it is "Picture 1".
When I paste it into Workbook B is becomes the next image in
progression for example "Picture 1863" I need to have the macro
automatically recognize the new "Picture Number" so that I can utilize
positioning commands such as:

Sheet1.Shapes("Picture 1").Left = Range("H29").Center
Sheet1.Shapes("Picture 1").Top = Range("H29").Top

What can be utilized to to allow the new "Picture Number" to be
utilized in the positioning commands?

I might also point out this image copies and pastes in to 6 different
worksheets on the same workbook so each time the image pastes, it
takes on a new number. I need to be able to control the positioning
of each image.

 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      10th Oct 2007
Use the technique I used in my reply to your other post, e.g.:

With Sheet1
With .Pictures(.Pictures.Count)
.Left = .Range("H29").Left
.Top = .Range("H29").Top
End With
End With

No need to know the name of the picture at all...

In article <(E-Mail Removed)>,
(E-Mail Removed) wrote:

> I am using a macro to copy and paste an image from one workbook to
> another. When I copy the image from Workbook A it is "Picture 1".
> When I paste it into Workbook B is becomes the next image in
> progression for example "Picture 1863" I need to have the macro
> automatically recognize the new "Picture Number" so that I can utilize
> positioning commands such as:
>
> Sheet1.Shapes("Picture 1").Left = Range("H29").Center
> Sheet1.Shapes("Picture 1").Top = Range("H29").Top
>
> What can be utilized to to allow the new "Picture Number" to be
> utilized in the positioning commands?
>
> I might also point out this image copies and pastes in to 6 different
> worksheets on the same workbook so each time the image pastes, it
> takes on a new number. I need to be able to control the positioning
> of each image.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing background of a clip art picture or cutting the object =?Utf-8?B?THVuYQ==?= Microsoft Powerpoint 1 19th Aug 2007 09:22 PM
Cutting and Pasting =?Utf-8?B?QWtpcmE=?= Windows XP Basics 12 25th Aug 2006 08:10 PM
Cutting and Pasting Mark Bennett Microsoft Powerpoint 4 16th Jan 2004 05:16 AM
cutting and pasting daniel Microsoft Windows 2000 0 21st Oct 2003 06:02 AM
Changing Cutting & Pasting Default? Grativo Microsoft Excel Misc 0 17th Sep 2003 02:33 AM


Features
 

Advertising
 

Newsgroups
 


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