It took about 8-10 seconds for them to fully executed.
I am just a beginner with Excel VBA I would highly appreciate any help. Column Case Is = 4 'This column contain invoice number 'Take the user to Invoice input form to edit the invoice they just double-clicked on a = Active Cell.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Screen Updating = True End If For j = 1 To 200000 ws. Finally I must add that those two Excel run on different machines: Excel 2010 with W7 and Excel 2013 with W8 I think that's all, for now you should avoid any code that selects or activates anything, work with fully qualified ranges instead of selection i believe that screenupdating can only be relied on to work correctly within the procedure it is called, if in doubt just put at the beginning of every procedure i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next Sub put Numbers In Cells() Dim ws As Worksheet Dim j As Long Dim resp As Integer Set ws = Active Sheet resp = Msg Box("Turn off updating? Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next dim previous Screen Update as boolean Call my Screen Update(False, previous Screen Update) 'to get the current setting into previous Screen Update Call my Screen Update(True, false) 'to set updating to false 'do your heavy code here and when finished: Call my Screen Update(True, previous Screen Update)maybe you have fiddled around with the code and thought the first "Call my Screen Update(True, previous Screen Update)" is useless/wrong?
To follow up on Pete and DS, why are you switching between workbooks? Screenupdating=false won't prevent the "switching" from being displayed, so I'm not understanding why you wouldn't see that in 2010 as well.
Then on another sheet I summarize all entered invoices with a pivotable (sheet "rpt_LSGD"). Value = a 'Xoa form phan cong nhiem vu Sheets("frm Phan Cong Nh Vu"). Clear Contents 'Chuyen sang form phan cong nhiem vu Sheets("frm Phan Cong Nh Vu"). Select Else 'Neu da phan cong thi nhap du lieu cu vao form phan cong For Each b In Sheets("frm Phan Cong Nh Vu").
This sometimes causes Excel’s application window to become totally unresponsive.
The way out of this frozen state is simple: Go back to the VBE, and execute the following statement in the Immediate window: If you have a worksheet with many complex formulas, you may find that you can speed things considerably by setting the calculation mode to manual while your macro is executing.
Let's assume you have number in A1 that is not working in a VLOOKUP.
Put this formula in B1 "=IF(ISNUMBER(A1*1), A1*1, A1)". That formula will work for numbers and anything else. Every time it would center to the middle of the text.