Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Slow file with INDIRECT.EXT | Excel Worksheet Functions | |||
slow opening any file | Excel Discussion (Misc queries) | |||
Slow file saves | Excel Programming | |||
Slow File Search | Excel Programming | |||
slow file to open | Excel Programming |