dominicwellsuk
New Member
- Joined
- Mar 23, 2011
- Messages
- 28
Hi, I've searched far and wide on this forum for users with a similar problem but mine seems to be unique.
I have the following code to clear the sheet then bring in fresh data from various worksheets and paste it sequentially in the new workbook...
Sub copyconcerns()
ScreenUpdating = False
Application.DisplayAlerts = False
Range("B7:U3000").Select
Selection.ClearContents
Range("A1").Select
Application.Workbooks.Open ("d:\DW.xls")
Worksheets("Log").Activate
LastRow = Range("B2000").End(xlUp).Row
Range("B4:U" & LastRow).Activate
Selection.Copy
Workbooks("DW.xls").Close SaveChanges = False
Windows("Management Document v2.xls").Activate
Range("B7").Select
ActiveSheet.Paste
Application.Workbooks.Open ("d:\RM.xls")
Worksheets("Log").Activate
LastRow = Range("B2000").End(xlUp).Row
Range("B4:U" & LastRow).Select
Selection.Copy
Workbooks("RM.xls").Close SaveChanges = False
Windows("Management Document v2.xls").Activate
Range("B65536").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
This works a treat in terms of what I want it to do, but as soon as the copied data is in the new sheet, every 5 seconds or so, the sheet stalls for 2 seconds, meaning working with it is a nightmare. I've tried deleting the data from the sheet but the stalling problem remains, even when I make it an entirely blank workbook!
Any idea what might be causing this? There are no formulas or lookups etc in the data that is being copied, it's just pure text and numbers. I've tried removing autocalculation and autoupdating of links but to no avail, and there is nothing to calculate or link to anyway!
The amount of data I'm working with is about 40 rows x 15 columns, so not very much.
This has me stumped. Any ideas on how to stop this would be greatly appreciated.
Thanks
I have the following code to clear the sheet then bring in fresh data from various worksheets and paste it sequentially in the new workbook...
Sub copyconcerns()
ScreenUpdating = False
Application.DisplayAlerts = False
Range("B7:U3000").Select
Selection.ClearContents
Range("A1").Select
Application.Workbooks.Open ("d:\DW.xls")
Worksheets("Log").Activate
LastRow = Range("B2000").End(xlUp).Row
Range("B4:U" & LastRow).Activate
Selection.Copy
Workbooks("DW.xls").Close SaveChanges = False
Windows("Management Document v2.xls").Activate
Range("B7").Select
ActiveSheet.Paste
Application.Workbooks.Open ("d:\RM.xls")
Worksheets("Log").Activate
LastRow = Range("B2000").End(xlUp).Row
Range("B4:U" & LastRow).Select
Selection.Copy
Workbooks("RM.xls").Close SaveChanges = False
Windows("Management Document v2.xls").Activate
Range("B65536").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
This works a treat in terms of what I want it to do, but as soon as the copied data is in the new sheet, every 5 seconds or so, the sheet stalls for 2 seconds, meaning working with it is a nightmare. I've tried deleting the data from the sheet but the stalling problem remains, even when I make it an entirely blank workbook!
Any idea what might be causing this? There are no formulas or lookups etc in the data that is being copied, it's just pure text and numbers. I've tried removing autocalculation and autoupdating of links but to no avail, and there is nothing to calculate or link to anyway!
The amount of data I'm working with is about 40 rows x 15 columns, so not very much.
This has me stumped. Any ideas on how to stop this would be greatly appreciated.
Thanks