#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default FILE 2 SLOW

the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster

heres the code im using:

For a = 2 To 2000
strBlah = Sheet5.Cells(a, 6)
Sheet10.Cells(g, 1) = strBlah
Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
g = g + 1
Next a

Application.ScreenUpdating = True



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default FILE 2 SLOW

I did not see if you turned your calculator to manual.

Application.Calculation = x1CalculationManual

' code
Application.Calculation = x1CalculationAutomatic

" wrote:

the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster

heres the code im using:

For a = 2 To 2000
strBlah = Sheet5.Cells(a, 6)
Sheet10.Cells(g, 1) = strBlah
Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
g = g + 1
Next a

Application.ScreenUpdating = True




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default FILE 2 SLOW

On Mar 10, 4:05*pm, Rpettis31
wrote:
I did not see if you turned your calculator to manual.

Application.Calculation = x1CalculationManual

' code
Application.Calculation = x1CalculationAutomatic



" wrote:
the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster


heres the code im using:


For a = 2 To 2000
* * strBlah = Sheet5.Cells(a, 6)
* * Sheet10.Cells(g, 1) = strBlah
* * Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
* * Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
* * Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
* * g = g + 1
Next a


Application.ScreenUpdating = True- Hide quoted text -


- Show quoted text -


WHICH ONE SHOULD I USE, NOT EXACTLY SURE WHAT IT MEANS
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default FILE 2 SLOW

Use the first one at the start of your code Application.Calculation =
x1CalculationManual
This way any calculations will not occur until the program runs. This
typically causes programs to run slow as Excel will do whatever calculations
on the sheets then returns to the program.

Then before you end your program turn the calculator back on with
Application.Calculation = x1CalculationAutomatic

" wrote:

On Mar 10, 4:05 pm, Rpettis31
wrote:
I did not see if you turned your calculator to manual.

Application.Calculation = x1CalculationManual

' code
Application.Calculation = x1CalculationAutomatic



" wrote:
the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster


heres the code im using:


For a = 2 To 2000
strBlah = Sheet5.Cells(a, 6)
Sheet10.Cells(g, 1) = strBlah
Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
g = g + 1
Next a


Application.ScreenUpdating = True- Hide quoted text -


- Show quoted text -


WHICH ONE SHOULD I USE, NOT EXACTLY SURE WHAT IT MEANS

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default FILE 2 SLOW

FORSOME REASON ITS NOT WORKING CORRECTLY
IT GIVE ME AN ERROR

here the full code i have on there

Private Sub cmdImport_Click()
Dim j, a, b, g As Integer
Dim strBlah As String

'Application.ScreenUpdating = False
Application.Calculation = x1CalculationManual = False


Sheet12.Range("A9:C2000").Select
Selection.Clear
Selection.WrapText = True

g = 9 'starting row

'For j = 3 To 1000000
'If Sheet2.Cells(j, 1) = "" Then
'j = j + 1
'GoTo 1
'End If
'Next j
'1:

For a = 2 To 2000
strBlah = Sheet2.Cells(a, 6)
Sheet12.Cells(g, 1) = strBlah
Sheet12.Cells(g, 2) = Sheet2.Cells(a, 14)
Sheet12.Cells(g, 3) = Sheet2.Cells(a, 3) & " " & Sheet2.Cells(a,
8) & " " & Sheet2.Cells(a, 10) & " Phn#:" & Sheet2.Cells(a, 11)
Sheet12.Cells(g, 4) = Sheet2.Cells(a, 16)
g = g + 1
Next a

Application.Calculation = x1CalculationAutomatic = True
'Application.ScreenUpdating = True

End Sub




On Mar 11, 10:08*am, Rpettis31
wrote:
Use the first one at the start of your code Application.Calculation =
x1CalculationManual
This way any calculations will not occur until the program runs. *This
typically causes programs to run slow as Excel will do whatever calculations
on the sheets then returns to the program.

Then before you end your program turn the calculator back on with
Application.Calculation = x1CalculationAutomatic



" wrote:
On Mar 10, 4:05 pm, Rpettis31
wrote:
I did not see if you turned your calculator to manual.


Application.Calculation = x1CalculationManual


' code
Application.Calculation = x1CalculationAutomatic


" wrote:
the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster


heres the code im using:


For a = 2 To 2000
* * strBlah = Sheet5.Cells(a, 6)
* * Sheet10.Cells(g, 1) = strBlah
* * Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
* * Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
* * Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
* * g = g + 1
Next a


Application.ScreenUpdating = True- Hide quoted text -


- Show quoted text -


WHICH ONE SHOULD I USE, NOT EXACTLY SURE WHAT IT MEANS- Hide quoted text -


- Show quoted text -




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default FILE 2 SLOW


What type of error is it?


" wrote:

FORSOME REASON ITS NOT WORKING CORRECTLY
IT GIVE ME AN ERROR

here the full code i have on there

Private Sub cmdImport_Click()
Dim j, a, b, g As Integer
Dim strBlah As String

'Application.ScreenUpdating = False
Application.Calculation = x1CalculationManual = False


Sheet12.Range("A9:C2000").Select
Selection.Clear
Selection.WrapText = True

g = 9 'starting row

'For j = 3 To 1000000
'If Sheet2.Cells(j, 1) = "" Then
'j = j + 1
'GoTo 1
'End If
'Next j
'1:

For a = 2 To 2000
strBlah = Sheet2.Cells(a, 6)
Sheet12.Cells(g, 1) = strBlah
Sheet12.Cells(g, 2) = Sheet2.Cells(a, 14)
Sheet12.Cells(g, 3) = Sheet2.Cells(a, 3) & " " & Sheet2.Cells(a,
8) & " " & Sheet2.Cells(a, 10) & " Phn#:" & Sheet2.Cells(a, 11)
Sheet12.Cells(g, 4) = Sheet2.Cells(a, 16)
g = g + 1
Next a

Application.Calculation = x1CalculationAutomatic = True
'Application.ScreenUpdating = True

End Sub




On Mar 11, 10:08 am, Rpettis31
wrote:
Use the first one at the start of your code Application.Calculation =
x1CalculationManual
This way any calculations will not occur until the program runs. This
typically causes programs to run slow as Excel will do whatever calculations
on the sheets then returns to the program.

Then before you end your program turn the calculator back on with
Application.Calculation = x1CalculationAutomatic



" wrote:
On Mar 10, 4:05 pm, Rpettis31
wrote:
I did not see if you turned your calculator to manual.


Application.Calculation = x1CalculationManual


' code
Application.Calculation = x1CalculationAutomatic


" wrote:
the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster


heres the code im using:


For a = 2 To 2000
strBlah = Sheet5.Cells(a, 6)
Sheet10.Cells(g, 1) = strBlah
Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
g = g + 1
Next a


Application.ScreenUpdating = True- Hide quoted text -


- Show quoted text -


WHICH ONE SHOULD I USE, NOT EXACTLY SURE WHAT IT MEANS- Hide quoted text -


- Show quoted text -



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default FILE 2 SLOW

runtime error 1004
method calculation of object_application failed

On Mar 11, 1:30*pm, Rpettis31
wrote:
What type of error is it? *



" wrote:
FORSOME REASON ITS NOT WORKING CORRECTLY
IT GIVE ME AN ERROR


here the full code i have on there


Private Sub cmdImport_Click()
Dim j, a, b, g As Integer
Dim strBlah As String


'Application.ScreenUpdating = False
Application.Calculation = x1CalculationManual = False


Sheet12.Range("A9:C2000").Select
Selection.Clear
Selection.WrapText = True


g = 9 'starting row


'For j = 3 To 1000000
* * 'If Sheet2.Cells(j, 1) = "" Then
* * * * 'j = j + 1
* * * * 'GoTo 1
* * 'End If
'Next j
'1:


For a = 2 To 2000
* * strBlah = Sheet2.Cells(a, 6)
* * Sheet12.Cells(g, 1) = strBlah
* * Sheet12.Cells(g, 2) = Sheet2.Cells(a, 14)
* * Sheet12.Cells(g, 3) = Sheet2.Cells(a, 3) & " " & Sheet2.Cells(a,
8) & " " & Sheet2.Cells(a, 10) & " Phn#:" & Sheet2.Cells(a, 11)
* * Sheet12.Cells(g, 4) = Sheet2.Cells(a, 16)
* * g = g + 1
Next a


Application.Calculation = x1CalculationAutomatic = True
'Application.ScreenUpdating = True


End Sub


On Mar 11, 10:08 am, Rpettis31
wrote:
Use the first one at the start of your code Application.Calculation =
x1CalculationManual
This way any calculations will not occur until the program runs. *This
typically causes programs to run slow as Excel will do whatever calculations
on the sheets then returns to the program.


Then before you end your program turn the calculator back on with
Application.Calculation = x1CalculationAutomatic


" wrote:
On Mar 10, 4:05 pm, Rpettis31
wrote:
I did not see if you turned your calculator to manual.


Application.Calculation = x1CalculationManual


' code
Application.Calculation = x1CalculationAutomatic


" wrote:
the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster


heres the code im using:


For a = 2 To 2000
* * strBlah = Sheet5.Cells(a, 6)
* * Sheet10.Cells(g, 1) = strBlah
* * Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
* * Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
* * Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
* * g = g + 1
Next a


Application.ScreenUpdating = True- Hide quoted text -


- Show quoted text -


WHICH ONE SHOULD I USE, NOT EXACTLY SURE WHAT IT MEANS- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default FILE 2 SLOW

Change this line:
Application.Calculation = x1CalculationManual = False
to
Application.Calculation = xlCalculationManual
(remove the "= False" and change x1 (x-one) to XL (x-ell))

And same with this line:
Application.Calculation = x1CalculationAutomatic = True
becomes:
Application.Calculation = xlCalculationAutomatic



wrote:

FORSOME REASON ITS NOT WORKING CORRECTLY
IT GIVE ME AN ERROR

here the full code i have on there

Private Sub cmdImport_Click()
Dim j, a, b, g As Integer
Dim strBlah As String

'Application.ScreenUpdating = False
Application.Calculation = x1CalculationManual = False

Sheet12.Range("A9:C2000").Select
Selection.Clear
Selection.WrapText = True

g = 9 'starting row

'For j = 3 To 1000000
'If Sheet2.Cells(j, 1) = "" Then
'j = j + 1
'GoTo 1
'End If
'Next j
'1:

For a = 2 To 2000
strBlah = Sheet2.Cells(a, 6)
Sheet12.Cells(g, 1) = strBlah
Sheet12.Cells(g, 2) = Sheet2.Cells(a, 14)
Sheet12.Cells(g, 3) = Sheet2.Cells(a, 3) & " " & Sheet2.Cells(a,
8) & " " & Sheet2.Cells(a, 10) & " Phn#:" & Sheet2.Cells(a, 11)
Sheet12.Cells(g, 4) = Sheet2.Cells(a, 16)
g = g + 1
Next a

Application.Calculation = x1CalculationAutomatic = True
'Application.ScreenUpdating = True

End Sub

On Mar 11, 10:08 am, Rpettis31
wrote:
Use the first one at the start of your code Application.Calculation =
x1CalculationManual
This way any calculations will not occur until the program runs. This
typically causes programs to run slow as Excel will do whatever calculations
on the sheets then returns to the program.

Then before you end your program turn the calculator back on with
Application.Calculation = x1CalculationAutomatic



" wrote:
On Mar 10, 4:05 pm, Rpettis31
wrote:
I did not see if you turned your calculator to manual.


Application.Calculation = x1CalculationManual


' code
Application.Calculation = x1CalculationAutomatic


" wrote:
the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster


heres the code im using:


For a = 2 To 2000
strBlah = Sheet5.Cells(a, 6)
Sheet10.Cells(g, 1) = strBlah
Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
g = g + 1
Next a


Application.ScreenUpdating = True- Hide quoted text -


- Show quoted text -


WHICH ONE SHOULD I USE, NOT EXACTLY SURE WHAT IT MEANS- Hide quoted text -


- Show quoted text -


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default FILE 2 SLOW

OMG that worked perfect. thank u so much. what did u use to learn
more? i would like to learn alot more.

On Mar 11, 3:51*pm, Dave Peterson wrote:
Change this line:
Application.Calculation = x1CalculationManual = False
to
Application.Calculation = xlCalculationManual
(remove the "= False" and change x1 (x-one) to XL (x-ell))

And same with this line:
Application.Calculation = x1CalculationAutomatic = True
becomes:
Application.Calculation = xlCalculationAutomatic





wrote:

FORSOME REASON ITS NOT WORKING CORRECTLY
IT GIVE ME AN ERROR


here the full code i have on there


Private Sub cmdImport_Click()
Dim j, a, b, g As Integer
Dim strBlah As String


'Application.ScreenUpdating = False
Application.Calculation = x1CalculationManual = False


Sheet12.Range("A9:C2000").Select
Selection.Clear
Selection.WrapText = True


g = 9 'starting row


'For j = 3 To 1000000
* * 'If Sheet2.Cells(j, 1) = "" Then
* * * * 'j = j + 1
* * * * 'GoTo 1
* * 'End If
'Next j
'1:


For a = 2 To 2000
* * strBlah = Sheet2.Cells(a, 6)
* * Sheet12.Cells(g, 1) = strBlah
* * Sheet12.Cells(g, 2) = Sheet2.Cells(a, 14)
* * Sheet12.Cells(g, 3) = Sheet2.Cells(a, 3) & " " & Sheet2.Cells(a,
8) & " " & Sheet2.Cells(a, 10) & " Phn#:" & Sheet2.Cells(a, 11)
* * Sheet12.Cells(g, 4) = Sheet2.Cells(a, 16)
* * g = g + 1
Next a


Application.Calculation = x1CalculationAutomatic = True
'Application.ScreenUpdating = True


End Sub


On Mar 11, 10:08 am, Rpettis31
wrote:
Use the first one at the start of your code Application.Calculation =
x1CalculationManual
This way any calculations will not occur until the program runs. *This
typically causes programs to run slow as Excel will do whatever calculations
on the sheets then returns to the program.


Then before you end your program turn the calculator back on with
Application.Calculation = x1CalculationAutomatic


" wrote:
On Mar 10, 4:05 pm, Rpettis31
wrote:
I did not see if you turned your calculator to manual.


Application.Calculation = x1CalculationManual


' code
Application.Calculation = x1CalculationAutomatic


" wrote:
the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster


heres the code im using:


For a = 2 To 2000
* * strBlah = Sheet5.Cells(a, 6)
* * Sheet10.Cells(g, 1) = strBlah
* * Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
* * Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
* * Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
* * g = g + 1
Next a


Application.ScreenUpdating = True- Hide quoted text -


- Show quoted text -


WHICH ONE SHOULD I USE, NOT EXACTLY SURE WHAT IT MEANS- Hide quoted text -


- Show quoted text -


--

Dave Peterson- Hide quoted text -

- Show quoted text -


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default FILE 2 SLOW

Mostly from lurking in the newsgroups and trying things myself.

You may want to invest in a book, too. John Walkenbach's are very good to
start.

Debra Dalgleish has a list of books at her site:
http://www.contextures.com/xlbooks.html



wrote:

OMG that worked perfect. thank u so much. what did u use to learn
more? i would like to learn alot more.

On Mar 11, 3:51 pm, Dave Peterson wrote:
Change this line:
Application.Calculation = x1CalculationManual = False
to
Application.Calculation = xlCalculationManual
(remove the "= False" and change x1 (x-one) to XL (x-ell))

And same with this line:
Application.Calculation = x1CalculationAutomatic = True
becomes:
Application.Calculation = xlCalculationAutomatic





wrote:

FORSOME REASON ITS NOT WORKING CORRECTLY
IT GIVE ME AN ERROR


here the full code i have on there


Private Sub cmdImport_Click()
Dim j, a, b, g As Integer
Dim strBlah As String


'Application.ScreenUpdating = False
Application.Calculation = x1CalculationManual = False


Sheet12.Range("A9:C2000").Select
Selection.Clear
Selection.WrapText = True


g = 9 'starting row


'For j = 3 To 1000000
'If Sheet2.Cells(j, 1) = "" Then
'j = j + 1
'GoTo 1
'End If
'Next j
'1:


For a = 2 To 2000
strBlah = Sheet2.Cells(a, 6)
Sheet12.Cells(g, 1) = strBlah
Sheet12.Cells(g, 2) = Sheet2.Cells(a, 14)
Sheet12.Cells(g, 3) = Sheet2.Cells(a, 3) & " " & Sheet2.Cells(a,
8) & " " & Sheet2.Cells(a, 10) & " Phn#:" & Sheet2.Cells(a, 11)
Sheet12.Cells(g, 4) = Sheet2.Cells(a, 16)
g = g + 1
Next a


Application.Calculation = x1CalculationAutomatic = True
'Application.ScreenUpdating = True


End Sub


On Mar 11, 10:08 am, Rpettis31
wrote:
Use the first one at the start of your code Application.Calculation =
x1CalculationManual
This way any calculations will not occur until the program runs. This
typically causes programs to run slow as Excel will do whatever calculations
on the sheets then returns to the program.


Then before you end your program turn the calculator back on with
Application.Calculation = x1CalculationAutomatic


" wrote:
On Mar 10, 4:05 pm, Rpettis31
wrote:
I did not see if you turned your calculator to manual.


Application.Calculation = x1CalculationManual


' code
Application.Calculation = x1CalculationAutomatic


" wrote:
the excel file im working on performs code too slow. it tak emore than
30min to upload and update everything. is there anything i can do to
make it perform a little faster


heres the code im using:


For a = 2 To 2000
strBlah = Sheet5.Cells(a, 6)
Sheet10.Cells(g, 1) = strBlah
Sheet10.Cells(g, 2) = Sheet5.Cells(a, 14)
Sheet10.Cells(g, 3) = Sheet5.Cells(a, 3) & " " & Sheet5.Cells(a,
8) & " " & Sheet5.Cells(a, 10) & " Phn#:" & Sheet5.Cells(a, 11)
Sheet10.Cells(g, 4) = Sheet5.Cells(a, 16)
g = g + 1
Next a


Application.ScreenUpdating = True- Hide quoted text -


- Show quoted text -


WHICH ONE SHOULD I USE, NOT EXACTLY SURE WHAT IT MEANS- Hide quoted text -


- Show quoted text -


--

Dave Peterson- Hide quoted text -

- Show quoted text -


--

Dave Peterson
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
Slow file with INDIRECT.EXT KateB Excel Worksheet Functions 1 December 18th 09 08:51 PM
slow opening any file dawall33 Excel Discussion (Misc queries) 5 October 23rd 08 04:30 PM
Slow file saves Kent McPherson[_3_] Excel Programming 0 October 6th 05 02:44 PM
Slow File Search stratuser Excel Programming 1 May 18th 04 12:55 PM
slow file to open pabs[_18_] Excel Programming 2 January 15th 04 05:16 AM


All times are GMT +1. The time now is 08:13 AM.

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"