Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
code to copy excel sheet from 1 file to other
Hi, I want to copy one excell sheet fom 1 file to another. The sourc excel sheet contains some images also. Because of which row by row cop is not giving the result in the same format as present in the sourc file. Is there any code to just replicate the sheet in the same format. Regards, Ashis -- ashishpre ----------------------------------------------------------------------- ashishprem's Profile: http://www.excelforum.com/member.php...fo&userid=3148 View this thread: http://www.excelforum.com/showthread.php?threadid=51712 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
code to copy excel sheet from 1 file to other
Hi Ashish,
Try: '============= Public Sub Tester001() Dim srcWB As Workbook Dim destWB As Workbook Dim SH As Worksheet Set srcWB = Workbooks("First Book.xls") '<<=== CHANGE Set destWB = Workbooks("Second Book.xls") '<<=== CHANGE Set SH = srcWB.Sheets("Sheet2") SH.Copy After:=destWB.Sheets(1) End Sub '<<============= Amend the workbook and sheet names to accord with your scenario. --- Regards, Norman "ashishprem" wrote in message ... Hi, I want to copy one excell sheet fom 1 file to another. The source excel sheet contains some images also. Because of which row by row copy is not giving the result in the same format as present in the source file. Is there any code to just replicate the sheet in the same format. Regards, Ashish -- ashishprem ------------------------------------------------------------------------ ashishprem's Profile: http://www.excelforum.com/member.php...o&userid=31485 View this thread: http://www.excelforum.com/showthread...hreadid=517129 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy an excel sheet from one file to another including formulas | Excel Discussion (Misc queries) | |||
Macro Copy Excel Chart Sheet to PowePoint - Mod of Jon Peltier code | Charts and Charting in Excel | |||
Import text file into Excel 2007 then copy sheet to another workbo | Excel Discussion (Misc queries) | |||
VB code to copy sheet format to another sheet | Excel Discussion (Misc queries) | |||
Copy Sheet w/o VBA code | Excel Programming |