Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default pasting info from workbook to sheet in another workbook


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pull info from every sheet in a Workbook fenway022 Excel Worksheet Functions 0 December 13th 10 09:06 PM
Copy Info from 1 sheet to another within same workbook Julie Excel Worksheet Functions 1 July 12th 08 12:17 AM
Append info in all worksheets in workbook in one sheet Barb Reinhardt Excel Programming 6 December 21st 05 08:55 PM
How to prevent pasting to every sheet in workbook Nigel Brown[_2_] Excel Programming 2 January 7th 04 03:33 PM
Excel Gurus = want a macro in 1 workbook to get info from another workbook = Read please harry Excel Programming 5 December 20th 03 03:26 AM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"