S
s_ali_hassan
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.
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.