upgrade to 2007 excel

R

RobcPettit

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
 
P

PJFry

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.
 
R

RobcPettit

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
 
R

RobcPettit

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
 
R

RobcPettit

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top