ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   upgrade to 2007 excel (https://www.excelbanter.com/excel-programming/427745-upgrade-2007-excel.html)

RobcPettit[_2_]

upgrade to 2007 excel
 
Hi, with 2003 I had a workbook that, using vba, would open another
workbook, copy details from a certain worksheet and paste back into
first workbook, which using vba goes on to carry out tasks.. This all
worked fine. With 2007 the same procedure locks up excel. Ive tried
doing this manually. This is the outcome. If I open the book I want to
copy from and open a new workbook, copy and paste details into new
workbook works fine(with out vba). If I try to copy into my original
workbook (which contains vba modules), excel hangs. Any ideas.
Regards Robert


PJFry

upgrade to 2007 excel
 
The first thing I would do is to make sure that the correct reference
libraries are loaded.

When ever I run into hanging issues, I always pepper the code with message
boxes so I can track where I am at any given point. You should also try to
step-through the code to see where it hangs.

If you can, post the code. Someone may spot something.
--
Regards,

PJ
Please rate this post using the vote buttons if it was helpful.



"RobcPettit" wrote:

Hi, with 2003 I had a workbook that, using vba, would open another
workbook, copy details from a certain worksheet and paste back into
first workbook, which using vba goes on to carry out tasks.. This all
worked fine. With 2007 the same procedure locks up excel. Ive tried
doing this manually. This is the outcome. If I open the book I want to
copy from and open a new workbook, copy and paste details into new
workbook works fine(with out vba). If I try to copy into my original
workbook (which contains vba modules), excel hangs. Any ideas.
Regards Robert



[email protected]

upgrade to 2007 excel
 
Thankyou for your reply. Ive started working through my code. One
thing I find strange though is if I paste anything into the workbook
with the macros in it freezes. Even though Im not running the macros.
Regards Robert

[email protected]

upgrade to 2007 excel
 
This is my code
Sub collectdata()
Sheets("Results").Select
Range("a3:m" & Range("m1048576").End(xlUp).Row).ClearContents
ChDir _
"C:\Documents and Settings\robert\My Documents\Football
2009\csv downloads"
Workbooks.Open Filename:= _
"C:\Documents and Settings\robert\My Documents\Football
2009\csv downloads\importResults 2009.xlsm"

Sheets("UK").Select
Cells(Rows.Count, 1).End(xlUp).Select
Range("a3:m" & Range("m1048576").End(xlUp).Row).Select

Selection.Copy
Windows("Home Results 2008.xlsm").Activate
Range("A3").Select
ActiveSheet.Paste xxxxxx this is were it hangs xxxxxxx

Windows("importResults.xls").Activate
ActiveWorkbook.Close True



End Sub

[email protected]

upgrade to 2007 excel
 
Ok Ive just been trying it, watching in windows task manager and its
using 100% cpu and goes from runing to not responding intermitently
regards robert


All times are GMT +1. The time now is 07:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com