Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Picure to new workbook

Status
Not open for further replies.

mar050703

Technical User
Aug 3, 2007
99
GB
Hi

I have the following code:
Code:
'Sub to Save Deal Sheet to a New File
Debug.Print


Dim ws As Worksheet, wb As Workbook
Dim Fnme As String

Sheets("Deal Sheet").Select
Set ws = ActiveSheet
Set wb = Workbooks.Add(xlWBATWorksheet)

ws.Range("A1:E41").Copy
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteValues
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteFormats
Application.CutCopyMode = False
wb.Sheets(1).Columns("B:E").AutoFit


Fnme = ActiveSheet.[E3]
ActiveWorkbook.SaveAs "H:\SFM\Silverstone Approved Cars\Admin\Deal Sheets\" & Fnme & ".xlsx"
ActiveWorkbook.Close

However I have noticed that this is not copying across a picture, (Picture 2).
Please can someone help to copy the picture too.

Thanks in advance for your help

 
Hi

Is A1:E41 the range for all the data on the sheet? If so copy the sheet rather than the range.
 
Add full Paste first:
wb.Sheets(1).Range("A1").Paste
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteValues


combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top