Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA perfoming different in two computers same hardware configuration


Hi,

I have a problem with a VBA macro that copies a spreadsheet from on
workbook to another. This workbooks are more than 25 MB sizes each one
The first workbook perfome some analysis and the results are copied t
another woorkbook that compiles allthe results. The spreadshhet that i
being copied has a size of around 1 MB.

And runs the following code:


-Dim Analysis_date As Variant

Dim hoja, celda As String
File1 = Range("M2").Value
File2 = Range("M3").Value
Windows(File2).Activate
celda = Range("P2").Value
Group = Range("P3").Value
Totcities = Range("r2").Value
If Group = 1 Then
If Totcities < 29 Then
N = Totcities
Else
N = 30
End If
grp1 = 2
grp2 = 0

Else
N = Totcities + 1
grp1 = 31
grp2 = 29

End If

Sheets("TOTAL").Select
Windows(File1).Activate

Sheets("Investment Cost").Select
Capex_Type = Range("V79").Value
'N = Range("Av2").Value
'N = 22 '48
For i = grp1 To N '31
hoja = "Sheet" & i - grp2 '29

Windows(File1).Activate

Sheets("Investment Cost").Select
Range(celda).Select
ActiveCell.Offset(i, 0).Range("A1").Select
Selection.Copy
Range("j5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone
SkipBlanks:= _
False, Transpose:=False
Calculate
Analysis_date = Range("j10").Value

Sheets("Lo format").Select
Cells.Select
"Selection.Copy" *Here is the problem, the macro stop here fo
three minutes*
Windows(File2).Activate
Sheets(hoja).Select
Range("A1").Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks _
:=False, Transpose:=False

Next
Sheets("Total").Select
Range("A1").Select
Range("Q1").Value = Capex_Type
Application.ScreenUpdating = True
Calculate
End Sub-

The problem is that in the second "selection.copy", from one machine t
another the difference in time goes from 10 second to three minutes
this makes that the whole process takes in total from 5 minutes to
1/2 hour. I'm using the same hardware in both computers, I believ
that it can be a configuration of memory or something similar, but I d
not kown where to look, and what should i be reviewing.


Can some one help me?

Best Regards Jappe

--
japper7
-----------------------------------------------------------------------
japper70's Profile: http://www.excelforum.com/member.php...fo&userid=1579
View this thread: http://www.excelforum.com/showthread.php?threadid=27303

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA perfoming different in two computers same hardware configuration


This may sound like a daft question, but are you running the sam
version of Excel on both machines?, I had a similar problem when usin
a workbook and code created on an XP Excel 2003 and then ran it on a
XP Excel 97, on the 97 what took 3 minutes previously took 20 minutes.

Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=27303

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
Excel Formula Missing Cells Due To Hardware confusssed Excel Discussion (Misc queries) 2 February 4th 09 02:01 PM
perfoming ANOVA test ashash Excel Worksheet Functions 1 July 23rd 08 10:18 PM
Powerful desktop hardware configuration for Excel 2007 Adam Excel Discussion (Misc queries) 0 December 11th 07 05:01 PM
Hardware for optimum Excel performance claytorm Excel Discussion (Misc queries) 1 August 22nd 05 03:13 PM
fastest hardware for excel N Lennox Excel Programming 2 April 12th 04 07:30 PM


All times are GMT +1. The time now is 05:08 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"