Slow Running Macro

Oct 3, 2007

Below is the entire code that I am using. It is a simple routine which checks whether a part has started its release process or not, based upon dates. The code works and does what I want.

The problem that I have is that it is very slow, for example it takes 35 seconds to go through 530 lines items. In my (limeted) experiance, based on other VBA doodlings this slow.

View 9 Replies


ADVERTISEMENT

Macro Running Very Slow

Jun 11, 2009

I have the following macro in a worksheet...and it is running very slow. There are other macros in the worksheet and they all run very well. Any ideas by looking at this code why it would be so slow in running?

View 7 Replies View Related

Macro Running Slow

Jan 30, 2007

I have a macro that isn't very complex but it is running very slow, does anyone know any tricks on how to speed it up?

View 9 Replies View Related

Macro Running Very Slow - Cell (press Esc To Cancel)

Dec 10, 2009

I have written some very basic code to format a report in excel. When I run the code it take a very long time to execute and I receive the following error message at the foot of the page:

Cell (press esc to cancel)

Annoyingly I have had this error before and found the solution on the web but can't remember where. If memory serves my right I deleted some temp files from a specific location on my hard drive?

View 3 Replies View Related

Vba Running Slow

Aug 27, 2007

I have a workbook with macros Ive created that have been running just fine for 2 years now. Ive upgraded to a top of the line new Dell D830 dual core laptop with 2gb ram and installed excel 2003 (same excel as always). Certain macros that used to take a second or two to run on a celeron dell now take 3min's! Ive stepped through the code in debug mode and found that its hanging up in simple areas like "Columns("A:A").Select" and "Selection.ClearContents". We have 16 older laptops running these exact codes just fine all day long and the 2 new fast computers with core 2 duo processors are hanging up constantly in the same places in code. Ive gone through and made sure all the "option" settings are identical in excel. Is there some system setting That I'm missing or possibly an excel setting That I may have overlooked?

View 2 Replies View Related

Slow Running Code

Nov 6, 2008

My code runs so slow! The sheet only has 233 rows and 6 of them are not in the loop.

View 6 Replies View Related

Slow When Running Macros

Mar 21, 2008

I have a simple Macro. I assigned to a Form button.

when i click that button systems takes lots of time to complete the macro.

left down task bar it say calcuating cells and load from 1% to 100% ...

View 9 Replies View Related

Slow Running Spreadsheet

Jul 31, 2006

I have quite a large workbook, which runs very, very slowly when I'm on a certain sheet.

Scrolling seems to lag, and there is a long delay between me clicking a cell and it becoming active.

The sheet contains a number of web queries, and a number of cells which refernce other cells, both in the same worksheet, and other worksheets.

View 3 Replies View Related

Data Filters Running Very Slow

Oct 5, 2009

I have an excel sheet with about 3,000 products listed; there are 26 items of data listed against each.

I've been using Data Filters to manipulate the info, but my worksheet has suddenly started running incredibly slowly - up to 7 minutes to implement a simple filter selection.

There was no problem until I made a couple of changes last week:

1. Adding a simple pivot table

2. Using an Index column plus some linked formulae to extract a list of suppliers from the product list.

I assumed that it may be the INDEX and related formulae or the pivot table that were causing the Data Filters to run slow, so I deleted them, but to no effect. I've even gone so far as to copy the raw data into a new sheet, but it's still running incredibly slowly when I try to filter. I am convinced that the problem is related to some hidden legacy of the table or functions, as it only started once I'd added these, but I don't know if this is plausible in reality and if so how to get rid of it.

View 12 Replies View Related

Slow Vba Running With Xlsm Files?

Aug 29, 2013

i have a simple question regarding vba code involving opening/eleboration/closing of different excel workbooks' format. I saw that with xls/xlsx the macro works with relatively high speed, but it is very slow when it comes to xlsm file. Is there an explanation? Does a command which enhance speed for xlsm file exist?

View 8 Replies View Related

Users In Excel :: 50+ Running Slow

Dec 2, 2009

I have built an Application in Excel that is used by a userbase of 50+ people. Now, as standard, they are only able to access the document read only. The application writes data to an ".mdb" but the user cannot change the application directly istself.

Now, we've had the problem over the last few days that the program is running slowly when it is trying to write data back to the ".mdb" file.

I believe that it could be because connection to the sever that our application is running slowly (or the server is too highly trafficed) but our server team are telling me there is nothing wrong with the server and it's running slowly because there are too many people in one Excel application/

View 9 Replies View Related

Copy/Paste Code Running Very Slow

Apr 4, 2009

The code opens a varying workbook with the same format as the source workbook and copies specific columns into the source workbook.

It is currently taking about 20seconds to run.

The worksheets are protected and have merged cells hence the call TestMe line.

View 13 Replies View Related

Excel 2010 :: Legacy Macros Running Slow?

May 26, 2011

I have inherited support for a suite of Excel 2003 spreadsheets with complicated macros which run fine on XP. Having been tasked to test them on Windows 7 with Office 2010, I have not converted them as they are run by several sites globally who may not upgrade to Office 2010 at the same time. Hence they run in compatibility mode which in general is fine.

However, certain macros are veeeery slow and to the user would look like the app has hung. In debug I have found that the macro takes 10 minutes plus whenever it hits any of the following code:

Code:
With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With

ActiveWorkBook.PrecisionAsDisplayed = False
It goes slow on each of the three 'lines' so it seems that it is actually doing an auto calc each time!

Is there some configuration I can do to prevent this? Setting auto calc to Manual didn't work and anyway I loose things, like data validation, when I save it in Excel 2010.

View 4 Replies View Related

Slow Delete Row Macro

Mar 9, 2009

I have got the macro below, my problem is that when you run it, it takes 20 seconds or so. In my other larger spreadsheet it was almost instant.

View 4 Replies View Related

Macro Runs Slow

Nov 13, 2008

The code below runs on a spreadsheet that has approx 600 rows which INDEX and MATCH another spreadsheet which has approx 600 rows. I takes about 4 mins to run.
Sub QC()

Range("T1").Select
ActiveCell.FormulaR1C1 = "Compared CCCD"
Range("V4").Select
Columns("T:T").ColumnWidth = 15.29
Range("S1").Select
Selection.Copy
Range("T1").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Columns("T:T").Select...................

View 9 Replies View Related

Slow Macro Loop

Jan 10, 2007

Need some alternative code that would speed the execution of this macro. My weak attempt runs noticeably SLOW.

Dim cell As Range
For Each cell In Range("TPD")
If IsNumeric(cell) And Not IsEmpty(cell) Then
If cell.Value > 0 Then
cell.EntireColumn.Hidden = False
Else
cell.EntireColumn.Hidden = True
End If
End If
On Error Goto 0
Next
End Sub

View 2 Replies View Related

After Printing, The Macro Works Very Slow

Apr 5, 2007

I programmed a simple macro (attached to a button) that scan the lines in the sheet and uses the function: Cells(y,2).EntireRow.Hide=TRUE (in order to hide certain lines). Usually, It runs fast without problem. But when I print out an area of the sheet, it cause the macro to slow down substantially. (when it runs again). In order to fix that , I had to close the file and reopen it again ( and not print out)

View 7 Replies View Related

Speed Up Slow Copy Macro

Sep 24, 2007

i am currently using the following code to copy records from one sheet to new sheets that that are created and named in the first part of the if(). this works fine, however when i am dealing with 50,000 records it still takes 5-10min to get them all sorted. I think this although functional is horribly inefficiant, and am wondering how i might be able to speed up the process. possibly rather than check each record, then copy then paste individually to sort them, then read and select the list of cells until value changes, then copy over at once. i dont know if this would be faster or not, let me know what you think.


Sub autorec ()

Dim wSheet
Dim newSheetName As Variant Dim FNAC As Double
Dim OU As Double
Dim DS As Double
Dim CCY As String

View 9 Replies View Related

Diplay Progress Of Slow Macro

Jan 14, 2008

I'm running some macros that take a bit of time (1000-2000ms), and would like to give the user some feedback as to what's happening.... Ideally, I'd like to show a msgbox-like pop-up window saying something "processing..." while the macro executes.

I have tried using userforms (based on this post Excel VBA Macro- How to Create a Splash Screen for your Excel Workbook); however they halt background execution...

Is there any built-in functionality similar to .statusbar, but more obvious/visual that would allow this? I'm about to experiment with showing/hiding a textbox shape, but this seems a bit sloppy...

View 2 Replies View Related

Vlookup To .xlsm Macro Is Incredibly Slow

Jul 23, 2009

This is designed to be run on bid proposals, to calculate special discounts. My idea was that whoever was designing the bid would open this file, which has the discount information and the macro, and then run the macro on the file containing the bid.

This macro works. It worked really fast when it was in my personal.xls and referenced an .xlsx file for the vlookup. It was slower, but still tolerable, when I moved it to the .xlsm file and it still refenced the .xlsx file (an oversight on my part). Now that I fixed the vlookup reference to the .xlsm file, the same one that the macro itself is in, it has slowed to a crawl. What is going on?

View 2 Replies View Related

Macro Processing Time Is Very Slow (using Record Function)

Jun 17, 2009

I created this macro (below) using the record function but when I kick it off it takes 40 seconds or more to run.

View 4 Replies View Related

Slow Macro - Multiple Vlookups To External Sheets

Feb 29, 2008

I'm working on a macro which compares values in particular cells across different versions of a sheet. Unfortunately there are quite a lot of values, and my code is running very slowly.

I'm trying to get the data in a grid, with the file version across the top, and down the left the project name. For each file version I need to look up a specific value for every project listed.

At the moment, my macro is creating a seperate formula for each cell which does a vlookup on the project name to the specific external file.

The relevant bit of code is below

At the moment its runnig to slow by several orders of magnitude, Working on a 4 by 10 grid it takes about a minute, and I'm going to need it to be able to handle a 50 by 800 grid.

While the code is running, the CPU is not maxed out, so I'm assuming that its the calls to the file system which are taking all the time.

Application.ScreenUpdating = False

Dim ccount As Integer
Dim rcount As Integer
Dim sFilename As String
Dim sPath As String

With ActiveSheet
For ccount = 1 To Range("c1").End(xlToRight).Column - 2

sPath = Left(FileNamesList(ccount), InStr(FileNamesList(ccount), "Pipeline ~") - 1)

sFilename = Right(FileNamesList(ccount), Len(FileNamesList(ccount)) - InStr(FileNamesList(ccount), "Pipeline ~") + 1)

For rcount = 1 To Range("A65536").End(xlUp).Row - 2

by SDB.xls]Pipeline'!$A$1:$AO$300,3,0)

Cells(rcount + 2, ccount + 2) = "=VLOOKUP(""" & Cells(rcount + 2, 1) & """,'" & sPath & "[" & sFilename & "]Pipeline'!$A$1:$AO$300,3,0)"

Next rcount
Next ccount

End With

View 9 Replies View Related

Macro Stops Running The Macro Completely And Hangs In The Middle

Jul 3, 2007

Here in our department we made a pretty elaborate macro that takes a report and sorts them out to 17 different sheets in a one workbook. This Macro pulls a file from a specific location on our server and then opens the CSV sorts it out color codes all the important information and saves it back onto the server under you specific initials.

They are four PC's along with our Managers laptop that run this Macro daily.

About 3 weeks ago my Managers laptop stops running the Macro completely and hangs in the middle of the whole thing. Eventually crashing Excel.

We try to remove the modules and re-import them back into the personal macro workbork but this does not work. The Macro's did not change and still fully function on the other four desktops to this day.

I uninstall Office on my Managers laptop and reinstall. Import the Modules again and still hangs up in very same spot it did 3 weeks ago.

I've tried to lower the macro security to the lowest level also and I've still had no luck with this laptop. I don't understand. The Macro's function perfectly on other PC's but will not function on this laptop.

View 9 Replies View Related

Running A Macro When A Value Is Reached In A Specific Cell Used To Call Up Macro

Jan 7, 2009

I have a Sheet sheet1 and I want to run a macro when the cell D2 in Sheet1 is equal to 10,7,5,and 3. I only want this macro to run when those values are reached the macro then puts the data onto a sheet called wps. The macro is run as a module and is a sub macro.

View 9 Replies View Related

Speed-up Slow Macro Code: Entries In Column 73 - 85 Will Be Copied From WorkbookRust To The Other Workbook If The Numer In Column 5 Is The Same

Mar 25, 2008

my existing macro, as the run takes to much time to complete. (at least 20min) I've already tried several loops, but no one worked for me. Following situation: There are two excel files, entries in column 73 - 85 will be copied from WorkbookRust to the other workbook if the numer in column 5 is the same. Not every cell within this columns contains data, so the macro should automatically jump to the last entry in each of the above mentioned columns, instead of predefine the range as you see in the code below. After the data is copied to the other workbook, it will be filtered acc. to Sub FilterMain and then copied back to WorkbookRust. As already said, the whole thing works, just to lame.

Sub Allmacros()
Dim WorkbookRust As String
WorkbookRust = ActiveWorkbook.Name
ChDir "C:Documents and Settings vogtMy DocumentsRüstplausch"
Workbooks.Open Filename:= _
"C:Documents and Settings vogtMy DocumentsRüstplauschCH_Revenue_2008.xls"
Sheets("Main_Overview").Select
Windows(WorkbookRust).Activate
Application.run ActiveWorkbook.Name & "!UpdateEntries"
Application.run ActiveWorkbook.Name & "!FilterMain"
'not ask to overwrite existing file
Application.DisplayAlerts = False
Workbooks("CH_Revenue_2008.xls").Save
Workbooks("CH_Revenue_2008.xls").Close
End Sub

Sub UpdateEntries()......................

View 7 Replies View Related

Running A Macro

Dec 19, 2006

Can i run a macro by just the pointer going over it.

View 9 Replies View Related

Running A Macro On Save?

Apr 10, 2014

I'm trying to get a macro to run when the user presses the save button. I have the following code:

[Code] .......

This code is supposed to apply the TRIM function to every worksheet in the workbook when the user presses save, and the saves the results. I understand the Private Sub bit is the code to have the macro run during the save, but for some reason the macro itself isn't actually running. I'm not getting any error message, its just that the cells which should have the TRIM function applied to them aren't being corrected.

View 4 Replies View Related

Progress Bar While Macro Is Running?

Mar 10, 2014

I have a macro that takes about a minute to run. I would like to add a progress bar to appear once the macro starts running. There are no loops in the macro. What are my options?

View 3 Replies View Related

Running Private Sub From A Macro

Mar 17, 2014

I have 3 different sheets with a private sub on each all labelled

Private Sub CommandButton1_Click()

The macro's runs fine on each page.

I want to put a macro on a separate sheet that i can run each of those macro's

I did initially copy the original private macro and change the

Private Sub CommandButton1_Click()

to

sub report()

But I couldn't do all 3 in the same manner. i did change each name to something different... the other 2 subs did run, but they didn't do anything except put the massage box on the end saying that "the macro has finished".

The private macros are on sheets 26, 28 and 12.

View 3 Replies View Related

Running Macro In Different Workbooks

Mar 25, 2014

I have 7 different workbooks as part of my daily routine.

At present the first workbook is opened via the task scheduler, and the macro is run using the following code

[Code] .....

This then opens the next workbook and closes the current one. The next workbook then runs its macro again from a timed call

[Code] ...........

This repeats for 7 workbooks. The problem is, if a macro overruns - the whole schedule is out of sync when macro's are called depending on the time. What I would like to do, is link each macro by calling for the next one, and closing the current workbook. However, when i have tried to do this, the macro has always stopped when the workbook has been closed - the next macro doesn't run.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved