• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy an image from one worksheet and paste into another

jayexcel1

Member
Hi,

I have a workbook with two worksheets: Form and RawData.
Form has 3 fields and a space to paste a picture of the person.

I want to copy all these information into the RawData sheet.
The user of the sheet enters the information in the Form and clicks on ADD button.
The data gets copied into RawData sheet and clears the data from Form.
Again, the user enters next data which gets copied below the last entered data.

Issue is with the photo; any suggestions on how to copy the photo from Form to the RawData.
The photo should fit in the Photo column of RawData with fix row height of say 84.3 and column width of 22.78.

Any suggestions?

jay
 

Attachments

How's this? You can change the column widths and row heights before you start running any macros, and the macro will adjust the pic to fit within the cell.
 

Attachments

Thanks a lot Luke for the reply.
I tried to add another record and the field values got copied into the RawData perfectly. However, the photograph did not get copied; instead ADD button copied under the Photo column. I have attached the file again with the additional record.

jay
 

Attachments

Doh. I forgot that the button itself counts as a shape. Hmm. In the attached, I changed the name of the command button to "myButton". I then set the code to loop over the shapes/pictures in the sheet, to make sure it doesn't accidentally grab the button. Seems to be working better now. :)
 

Attachments

Back
Top