Advertisement

06.29.2008 at 09:18AM PDT, ID: 23525060
[x]
Attachment Details

Calculation slowed down my User Input Form.

Asked by Exl04 in Microsoft Excel Spreadsheet Software

Tags: , ,

I have a UserForm to input information of a Unit inspection on a sheet call Errors. In same workbook different sheet I made a summary of ERROS columns count, averages, etc. well this made my form run slow, because not it has to calculate all these averages and count in the ERRORS sheet before in clears and prints the information I enter with my form before it let me use it again (cycle time is very limited) so I turnedApplication.Calculation = the beginning of my ENTER button in the form and turned back and turned back to xlCalculationManual Application.Calculation = xlCalculationAutomatic.

Now the problem is that I have a print module that I call in the same ENTER subroutine and the number of fields is not complete because of the calculation on and off. If I enter a Unit inspected with one error the print sheet populates the 3 first fields Unit Number, Date Requested, and Auditor Name, but not the ERROR description, and if I enter a Unit with several errors it populates all the 4 fields but on the number of errors in only prints 4 if I input 5, 3 if I input 4 and so on.

How can I overcome the slow input of my form? Is the any other way to make the workbook wait until I print errors, or am I using the wrong method to stop the calculation before print?

Thanks in advance for any input.
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
'****************************************************************
'            [[ENTER BUTTON]]

'****************************************************************
 
    
    Private Sub CmdEnter_Click()
    Application.Calculation = xlCalculationManual
    
    Do stuff&..
    
    If chkClean = False Then
    Call PrintModule
    End If
  
    Application.Calculation = xlCalculationAutomatic
    
    Call UserForm_Initialize
    
    Application.ScreenUpdating = True
       
    
End If
----------------------------------------------------------------
 
 
Sub PrintModule()
 
  
 
    Dim shErrors As Worksheet
    Dim shPrint As Worksheet
    Dim r As Integer
    Dim s As Integer
    Dim UnitNumber As Long
    Application.ScreenUpdating = False
    
    Set shErrors = ActiveWorkbook.Sheets("ERRORS")
    Set shPrint = ActiveWorkbook.Sheets("Print")
    
    Sheets("Print").Select
    shPrint.Cells(4, 3).Value = ""
    shPrint.Cells(6, 1).Value = ""
    shPrint.Cells(6, 4).Value = ""
    shPrint.Cells(11, 3).Value = ""
    
    
    
    'PrintErrors.Value = ""
    
    'Find last unit number in Errors sheet
    r = 5
    Do
        UnitNumber = shErrors.Cells(r, 3).Value
        r = r + 1
    Loop Until shErrors.Cells(r, 3) = ""
    shPrint.Cells(4, 3).Value = UnitNumber
    
    'Find and copy details
    s = 11
    r = 5
 
    Do
        If shErrors.Cells(r, 3).Value = UnitNumber Then
            shPrint.Cells(6, 1).Value = shErrors.Cells(r, 4).Value 'Date
            shPrint.Cells(6, 4).Value = shErrors.Cells(r, 20).Value 'Inspector
            shPrint.Cells(s, 3).Value = shErrors.Cells(r, 6).Value 'Error description
            s = s + 1
        End If
        r = r + 1
    Loop Until shErrors.Cells(r, 3) = ""
    
    
     Sheets("Print").Select
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    
   
    
     Application.ScreenUpdating = True
    
    Sheets("ERRORS").Select
    
    
   
    
End Sub
[+][-]06.29.2008 at 12:18PM PDT, ID: 21895174

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.29.2008 at 01:23PM PDT, ID: 21895336

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.29.2008 at 11:58PM PDT, ID: 21897161

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 08:59AM PDT, ID: 21900338

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 09:50AM PDT, ID: 21900825

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 10:13AM PDT, ID: 21901041

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 11:48AM PDT, ID: 21901866

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 02:21PM PDT, ID: 21920865

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 03:41PM PDT, ID: 21921483

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Excel Spreadsheet Software
Tags: Microsoft, Excel, 2003
Sign Up Now!
Solution Provided By: Bert01
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.02.2008 at 04:47PM PDT, ID: 21921773

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 05:45PM PDT, ID: 21921962

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 06:50PM PDT, ID: 21922162

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628