Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() what i`m trying to do is to copy information from workbook1 to sheet1 of workbookA. Then open workbook2 and copy that information accross to sheet2 on workbookA. Then i`m trying to combine the info, form sheet1 and sheet2 to sheet3 on workbookA. My code copies workbook1 to sheet1, but then it does not for some reason, copy workbook2 to sheet2 of workbookA. my code is as follows Sub selectallremaining() 'select the remaining cells to copy into the mastersheet after grabbing relevant dates Cells.Select Cells.Activate Selection.Copy 'activate the mastersheet. Change file name of the mastersheet to `mastersheet` Workbooks.Open ("D:\Documents and Settings\ahassan\Desktop\polling report\mastersheet.xls") ActiveSheet.Paste 'do filesaveas main report. ActiveWorkbook.SaveCopyAs "D:\Documents and Settings\ahassan\Desktop\polling report\generatedreport.xls" End Sub 'workbook2 is already open Sub select2() Cells.Select Cells.Activate Selection.Copy 'activate the generated report file. Workbooks.Open ("D:\Documents and Settings\ahassan\Desktop\polling report\generatedreport.xls") 'paste in the information. Sheet2.Activate Sheet2.select ActiveSheet.Paste End Sub the error i get is that the paste area is too small or something like that. pls could i have some assisstance. Much appreciated Thanks. -- s_ali_hassan ------------------------------------------------------------------------ s_ali_hassan's Profile: http://www.excelforum.com/member.php...o&userid=35325 View this thread: http://www.excelforum.com/showthread...hreadid=552221 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pull info from every sheet in a Workbook | Excel Worksheet Functions | |||
Copy Info from 1 sheet to another within same workbook | Excel Worksheet Functions | |||
Append info in all worksheets in workbook in one sheet | Excel Programming | |||
How to prevent pasting to every sheet in workbook | Excel Programming | |||
Excel Gurus = want a macro in 1 workbook to get info from another workbook = Read please | Excel Programming |