![]() |
Pasting Format and values
Hello - I have a macro that creates a report (with formatting and logo), copies the report page to a new workbook, and saves it. It works well except that i can only copy either the formatting (inc logo/grid lines etc) and have my data show as #value, or the data (numbers and text only). Is there a way i can easily copy the whole report so that the formatting AND values show? Thanks -- LB79 ------------------------------------------------------------------------ LB79's Profile: http://www.excelforum.com/member.php...o&userid=12156 View this thread: http://www.excelforum.com/showthread...hreadid=397202 |
Can you try first pasting values then pasting formats? e.g. Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues Selection.PasteSpecial Paste:=xlPasteFormats -- Excel_Geek ------------------------------------------------------------------------ Excel_Geek's Profile: http://www.excelforum.com/member.php...o&userid=26423 View this thread: http://www.excelforum.com/showthread...hreadid=397202 |
Can you try first pasting values then pasting formats? e.g. Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues Selection.PasteSpecial Paste:=xlPasteFormats -- Excel_Geek ------------------------------------------------------------------------ Excel_Geek's Profile: http://www.excelforum.com/member.php...o&userid=26423 View this thread: http://www.excelforum.com/showthread...hreadid=397202 |
Can you try first pasting values then pasting formats? e.g. Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues Selection.PasteSpecial Paste:=xlPasteFormats -- Excel_Geek ------------------------------------------------------------------------ Excel_Geek's Profile: http://www.excelforum.com/member.php...o&userid=26423 View this thread: http://www.excelforum.com/showthread...hreadid=397202 |
Ive tried this but it doesnt paste everything... logos (jpg) are missing etc. Anything else i can do? Thanks -- LB79 ------------------------------------------------------------------------ LB79's Profile: http://www.excelforum.com/member.php...o&userid=12156 View this thread: http://www.excelforum.com/showthread...hreadid=397202 |
Are there more than one images you want to copy and paste? Try something like this: ActiveSheet.Shapes("Picture 1").Select Selection.Copy Sheets("(whatever the sheet is named)").Select Range("(whatever cell it goes in...)").Select ActiveSheet.Paste "Picture 1" is by default what Excel/VBA will name the image. You can find out if your logo is named something else by simply recording a macro where you copy and paste the logo. -- Excel_Geek ------------------------------------------------------------------------ Excel_Geek's Profile: http://www.excelforum.com/member.php...o&userid=26423 View this thread: http://www.excelforum.com/showthread...hreadid=397202 |
All times are GMT +1. The time now is 02:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com