Copy & paste question in macro's

sey

New Member
Joined
Apr 28, 2011
Messages
35
I have a question about to copy and paste in excel.
I wrote a macro so he copy a template, but if he paste, he don't paste the pictures too. So then i uses copypicture, but then i can't insert values in the cells, what code can i use to copy bouth in one time, or another solution?

If you need more information just ask, i"m new here.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Code:
Sub copypastetemplate()
    Dim bcell As Range
    Dim teller As Integer
    teller = 0
    Sheets("SETUP").Activate
    Range("begincellll").Select
    ActiveCell = ActiveCell.Offset(1, 1)

    For Each bcell In Range("Bereik")
        If IsEmpty(bcell) Then
            'bcell = blank
        Else: 'bcell = 1
            teller = teller + 1
    
            Sheets("Stuktekening gordingen").Activate
            Range("Print_Area").CopyPicture
            Sheets("Stuktekeningtemplate").Activate
           
            Range("startcel").Select
           
            ActiveCell.Offset(((teller - 1) * 50) + 1, 0).Select
            
                ActiveSheet.PasteSpecial
                
            
          
        End If
    Next bcell
  
    Sheets("SETUP").Activate
    Range("begincellll").Select
    ActiveCell.FormulaR1C1 = teller
    
End Sub [\code]
 
This is my code, with the teller, i count in another sheets how many times i need to copy and paste.
Everything works but my question starts from here : 
 Sheets("Stuktekening gordingen").Activate
            Range("Print_Area").CopyPicture
            Sheets("Stuktekeningtemplate").Activate
           
            Range("startcel").Select
           
            ActiveCell.Offset(((teller - 1) * 50) + 1, 0).Select
            
                ActiveSheet.PasteSpecial
 
I need to do .copypicture because my selection ("Print_Area"), contains images and text, and others he don't copy the images too, but with copypicture i can't write anything down anymore in this area, so is there a way to copy bouth without using . copypicture?  
 
Regards
 
Upvote 0

Forum statistics

Threads
1,216,308
Messages
6,129,996
Members
449,551
Latest member
MJS_53

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top