LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Combining multiple sheets onto one

I wrote the following code to combine multiple sheets - it worked fine, now,
however the machine hangs and I have to restart Excel, can anyone show more a
more elegant (less resource hungry) way of achieving my aim?

Many thanks in advance

******** Code Sample **********
sub Build_Summary()
'Now build summary sheet by copying in all the workstream sheets
Sheets("Summary").Select
Range("a1:bb5000").Select
Selection.Clear

Sheets("PMO").Select
Rows("4:2000").Select
Selection.Copy
Sheets("Summary").Select
Range("a1").Select
ActiveSheet.Paste

sheetname = "BC": GoSub copysheet
sheetname = "CSM": GoSub copysheet
sheetname = "OTC": GoSub copysheet
sheetname = "PTP": GoSub copysheet
sheetname = "SCM": GoSub copysheet
sheetname = "MAN": GoSub copysheet
sheetname = "CM": GoSub copysheet
sheetname = "DS": GoSub copysheet
GoTo finished2

copysheet:
Sheets(sheetname).Select
Rows("5:2000").Select
Selection.Copy
Sheets("Summary").Select
Range("A5").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Return
finished2:
End Sub
 
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
Combining multiple spread sheets into one flaschman Excel Discussion (Misc queries) 2 January 5th 10 10:50 PM
combining multiple sheets into one HERZHIS Excel Worksheet Functions 3 July 20th 07 08:53 PM
Combining multiple sheets Dallman Ross Excel Discussion (Misc queries) 14 July 1st 07 03:44 PM
combining multiple sheets Patio Excel Worksheet Functions 1 April 8th 06 01:20 AM
Combining data from multiple sheets Ron Vetter Excel Discussion (Misc queries) 1 April 29th 05 08:02 PM


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

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

About Us

"It's about Microsoft Excel"