Excel 2010 :: UI Updating Freezes During Massive VB Macro Crunching

Nov 30, 2011

I have an intensive VB program I've written that the user kicks off by clicking a button. I update a particular cell near the button with progress numbers so they can see what's going on. (This calculation can take up to 10 minutes.)

Sometimes, though, the UI stops updating. I know the calculation is still running because it completes eventually.

I am guessing Excel is getting too many updates to its screen (i.e. that cell) to keep up with the calculation going on in another thread, so it just gives up on the updating.

Is there a way to force Excel to keep updating the screen? I'm willing to give up the 0.01% slowdown in exchange for continuing to see progress. I see no need for the VB calculation thread to hog out the screen updater.

Excel 2010 on Win XP Pro SP3

View 9 Replies


ADVERTISEMENT

Excel 2010 :: Freezes Or Hangs In The Middle Of Work?

May 24, 2013

I have an issue with the excel freeze in our organisation.

Our organisation works on Citrix and the office applications have been upgraded to 2010 very recently.We have both 2003 excel users and 2010 excel users.There is a user who has a problem working on excel 2010 the excel freezes.Excel 2010 works fine for some time and all at a sudden hangs,once its hung it freezes all the other applications.

The same file runs properly on the other 2010 systems.The Excel file which hangs are also not of huge in size.

I am unable to get to the rootcause of the issue why the excel freezes or hangs in the middle of the work getting to the root cause of the issue and an answer for the excel hanging.

View 3 Replies View Related

Excel 2010 :: Freezes When Using Pull Function In INDEX / MATCH

Feb 14, 2014

I am using Excel 2010.

My objective is to pull specific values from an external file corresponding to the correct name and year of my choosing. The first way I thought would be best is to use an INDEX/MATCH function. The problem is the external files change names so I would need a method to easily change the source file name from one cell. I then stumbled across the INDIRECT function, but the INDIRECT function will only work when the source file is also opened. I then came across Harlan Grove's pull function which allows you to import data from closed excel files.

So, this is what my formula looks like: =INDEX(pull("'"&G12&"");MATCH(C15;pull("'"&G14&"");0);MATCH(D15;pull("'"&G16&"");0))

Cells G12,G14, and G16 contain the file paths for the ranges. C15 is name and D15 is year.

The problem I have though is that when I try to execute the function, Excel gets stuck. if the code cannot handle large amounts of data. I tested the code with a simple SUM function for a small range from an external file and it worked just fine.

This is the code I am using:

[Code] ...

View 3 Replies View Related

Looping Macro Freezes Excel When Encountering Large Numbers Of Rows

Sep 15, 2009

We are attempting to use the macro below.

We believe that the problem is "memory related."

However, we can't find the correct workaround to the issue.

In Excel 2002, the behavior was for the macro to work great on small numbers of rows, but to just stop on large numbers of rows. After it stopped, the user would manually run the macro throughout the spreadsheet, by holding down Ctrl + N.

In Excel 2007, the behavior of the program is different, and Excel actually freezes up.

We've narrowed down the problem to be possibly "memory related."

However, we don't know the correct workaround for this.

For example, in the posting below (the referenced link) they suggest using "variant arrays" to address memory limitations type of issues ... but I'm not sure of how to implement those.

View 6 Replies View Related

Excel 2010 :: Updating Linked Cell

Aug 14, 2012

I am using the Format as Table feature in 2010 and I am summing a range of cells (C2, D2 and E2) with the result in F2. I have linked F2 three rows below the table in cell C5.

When I add new data in the 3rd row in the table feature I can get an updated result in F3 but my linked cell does not update as it is now pushed to cell C6.

How can I have the linked cell update with the new total from cell F3 as it moves relative to the table?

View 1 Replies View Related

Excel 2010 :: Updating Scores For Each Parameter

Apr 5, 2013

I have below format in excel and i will be updating scores for each parameter (column B).

I will be inserting a command/click button and when i click on the button macro should take the name, contact No., scores from column B and paste it in sheet 2 in the same workbook in one row, in the same way when I click the button the scores should be taken from sheet 1 column b and paste one below other row in sheet 2 each time i click on button.

Below is how raw data looks like.

Column A
Column B

Name:
ABC

Contact Number:
XYZ

Parameter
Score

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

Output expected in sheet 2 is as below.

Name:
Contact Number:
Parameter A
Parameter B
Parameter C
Parameter D
Total Score

ABC
XYZ
2
5
6
7
5

I am using Excel 2010.

View 5 Replies View Related

Excel 2010 :: VLookup With Named Range Not Updating?

Oct 5, 2011

There is a formula

=vlookup(a1,Named_Range,2,false)

if I change a value in the range named "Named_Range" this vlookup does not update.

This formula works but does not allow for any updates. Meaning the vlookup returns the original value even after a cell has been changed. "Named_Range" is on a different sheet but in the same workbook.

Auto calculate is on. I have recalculated the cell manually. I have Office 2010

View 1 Replies View Related

Excel 2010 :: Horizontal Axis Labels Not Updating Range - Have To Update It Twice To Stick

Jan 28, 2013

I recently switched to Excel 2010 and have a rather peculiar problem.Every week I update a bunch of charts in different workbooks. By update, I pretty much mean just shifting the range over one column or down one row to incorporate newly added data.

So I right click the chart, select "Select Data", update all the Data series ranges and then I click on the Horizontal (Category) Axis Labels button "Edit" to update the Axis label range.

I do all that then press OK. The data series have updated, but the axis labels haven't. So then I do the procedure again for the Axis Labels, hit OK again and voila: It worked.

But I ALWAYS have to do this procedure twice. It will NEVER update the axis labels the first time around. Even though the little preview window below the edit button show the labels correctly.

View 1 Replies View Related

Excel Hangs And Freezes After Writing Simple If Statement

Nov 3, 2012

Background: The user makes a selection from a drop down box on the main sheet (sheet5, G12). The drop-down box is linked to *Sheet31.Pax_Nav*. If the drop-down box's linked cell value is less than 5, then do nothing (manual input required). If it is greater than 5, then the vlookup matches that number to a person in the database and returns their weight. The code will pull the required person's weight but then Excel will hang and freeze.

Private Sub Worksheet_Calculate()
On Error Resume Next
If Sheet31.Range("Pax_Nav") > 5 Then
Sheet5.Range("G12").Value = Application.WorksheetFunction.VLookup(Sheet31.Range("Pax_Nav").Value, Sheet31.Range("H17:L48"), 5, False)
Else
End If
End Sub

View 9 Replies View Related

Macro Code Hangs/Freezes Adding Rows

Sep 15, 2006

I've managed to use some code I found to add a new row below the selected row, and duplicate all the forumlas of the source row. It worked fine dozens of times yesterday, but today it's decided not to work. It gets as far as creating the new row(s), but then just hangs & excel crashes before duplicating the formulas. I've even tried reverting to an earlier version, which also worked fine, but this crashes also!

Sub Add_New_Row()
' Unlock Worksheet
Worksheets("Sheet1").Unprotect Password:="*****"
Dim x As Long
ActiveCell.EntireRow.Select 'So you do not have to preselect entire row
If vRows = 0 Then
vRows = Application.InputBox(prompt:= _
"How many rows do you want to add?", Title:="Add Rows", _
Default:=1, Type:=1) 'Default for 1 row, type 1 is number
If vRows = False Then Exit Sub
End If
'if you just want to add cells and not entire rows
'then delete ".EntireRow" in the following line
Dim sht As Worksheet, shts() As String, i As Integer
Redim shts(1 To Worksheets.Application. ActiveWorkbook. _
Windows(1).SelectedSheets.Count)..................................

View 7 Replies View Related

Excel 2007 :: Updating Access Using SQL In Macro

Mar 29, 2012

I have a CSV that I have a excel macro created to do some formatting and then export the data into Access. that part works. I also have it checking for duplicate entries and skipping them. The problem that i run into is that not all my duplicates are truly duplicate, there have been updates and now i need to update Access. I have 2 fields, my primary key which is what I'm primarily matching on and then I'm checking if its been updated by checking another field "Last Changed" If this field doesn't match then I need to update the record.

At this point I'm trying to use a SQL UPDATE and I now believe that i have it formatted correct but when it gets to a record that needs to be updated I get an error: Run-time error '-2147217887 (80040e21)': The changes you requested to the table were not successful because they would create duplicate values in the index, primary key or relationship. I'm not sure what I'm doing wrong. the only other thing i could think to do would be to check each field to see if it has changed and just run the query against that but I feel like i would run into the same issue.
This is how I'm connecting to Access:

Code:
strTableName = "TableName"
strDBLocation = "xxxxuserhomexxxxxxxxxxxxDatabaseDatabase Backend.accdb"
strConnect = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & strDBLocation & ";"

Set cn = New ADODB.Connection
cn.Open strConnect
Set rs = New ADODB.Recordset
rs.Open strTableName, cn, adOpenKeyset, adLockOptimistic, adCmdTable
And this is the Query I'm using:

Code:
strSQL = "UPDATE " & strTableName & " "
strSQL = strSQL & "SET [Work Order ID] = '" & Range("B" & r).Value & "', "
strSQL = strSQL & "[JOBSTATUS] = '" & Range("C" & r).Value & "', "
strSQL = strSQL & "[SUBSTATUS] = '" & Range("D" & r).Value & "', "
strSQL = strSQL & "[Job Status] = '" & Range("E" & r).Value & "', "
strSQL = strSQL & "[STATUSDATETIME] = #" & Range("F" & r).Value & "#, "

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

The SQL code sits in a loop with an IF so it shouldn't execute every time and I plan on once i get this working to revisit this code and try to optimize it but that is not a priority currently.

I'm using both Excel 2007 and Access 2007 on XP.

View 7 Replies View Related

Excel 2010 :: Getting Outlook Warning (2010) While Sending Email Through Macro

Mar 25, 2014

I am trying to send bulk emails from my excel 2010 - however I am getting a POP UP. find the screen shot in the enclosed word document So every time a new mail is sent from excel we need to press the button allow Is there a way where I can turn off this warning.

View 6 Replies View Related

Excel 2010 :: How To Save Excel File As Cell Reference Using Macro

Mar 5, 2012

I have created a macro in excel 2010 which enable the file to save (extract) data into separate location and name. The vba code for macro is as follows: Question: How can I save this workbook with reference to the value containing in cell B2? (it is named temporary now - as defined in the code)

Sub aaa()
'
' aaa Macro
'

[Code].....

View 1 Replies View Related

Excel 2010 :: Macro To Change Excel Formatted Table Name Dependent On Number Of Loops

Jul 9, 2012

Recorded macro. The hope is to insert a excel formatted table a set number of times. I have found a loop code that references a Cell A1 and repeats that amount of times. So if A1= 10. There should be 10 tables inserted. However on the second time there is a fault with the table name. I need the name to change each time the loop is run. ie Table1, Table2, Table3 etc up until the loop stops (A1 contents).

I am using excel for windows 2010. The macro that i have so far is below.

Sub LoopTest()
Dim n
Dim V
Range("A1").Select
V = ActiveCell.Value

[Code] ........

View 1 Replies View Related

Adjust Macro From Excel 2003 To Excel 2010?

Apr 1, 2014

I am trying to adjust the below macro so that it will work in Excel 2010.

Sub OpenAndProcess()
Dim fs As FileSearch
Dim I As Integer

[Code]....

View 3 Replies View Related

Excel 2010 :: Save As PDF Macro?

Apr 10, 2013

I need to create a macro that will allow me to save a PDF from an XL file I am creating by running a report out of Access. This report yields a workbook with 2 sheets in it. The first tab (sheet) called "Mishkon" and the second called "Women's League". I need to save these reports separately as PDFs and they need to be saved in seperate locations. The first sheet (Mishkon) needs to be saved here: \OSOFSDataDayHabMishkon . The second sheet needs to be saved here: \OSOFSDataDayHabWomen's League . Here is the twist... Both sheets need to take their name from their G3 cells. I have Excel 2010 and dont want to print from my Adobe PDF printer. I would like to save as a PDF so I can run it off of computers that dont have the Adobe PDF printer installed.

View 5 Replies View Related

Excel 2010 :: What Causes A Macro To Run Slower At Certain Times

Apr 2, 2014

When I run macros usually they're fast, but occasionally will run very slow. An example macro I have is pasted below. It's just a simple macro that pastes months. If I am pasting on top of a cell that contains a month it pastes the rest of the months that follow.

Most of the time this macro runs very fast, but occasionally it takes about 1-2 seconds to run, and it is a very simple macro! It is not macro specific, as all my macros will be slow. I''m using Windows 7 with Excel 2010. I'm only using 23% of my CPU and 4.5GB of my 16GB of RAM, so I don't think it's a hardware thing.

Is there some kind of condition that occurs that will make excel run macros slower?

[Code] .....

View 4 Replies View Related

Excel 2010 :: Run Macro In Another Workbook Without Copying It?

May 21, 2014

I used the button in Excel 2010 to record a macro that allows me to format a workbook font and stuff because i do that many times a day for several workbooks. However I want to be able to just push a button and have all open workbooks run the macro I recorded.

I am able to make a button- thats easy, but how do I get it to run for ANY workbook? My problem is that apparently it only runs the workbook that is named a certain way. should i post the code here?

View 1 Replies View Related

Excel 2010 :: VBA Script To Run A Macro On The Every Hour?

Jul 11, 2014

writing a VBA script that will execute a refresh macro every hour on the hour.

Using Excel 2010

View 4 Replies View Related

Excel 2010 :: Macro To Set Value Of Selected Cells?

Mar 27, 2012

The concept is to have a user open a sheet that breaks down that current day into 15 minute blocks of time. Later, I will work to append that to an Access DB or to a master Excel sheet as I will have multiple engineers inputing times for multiple days. There are multiple paths for this....We don't have Access for everyone yet or I would look at that path now.

Right now I am trying to make the initial input screen easy to use so that they actually use it.

I want to allow the user to select multiple 15 minute blocks and then click a button that adds a specific value to each of those cells. For instance, they might choose 8 15 min blocks that are not necessarily blocked together (C5, C7:C10, C15, C20:C22) They would hit the "Project 1" button and "Project 1" would be inserted into each of those cells.

I have about (5) categories so I would simply have (5) buttons with the different inptu strings.

But how can I have a macro set the value for multiple selected cells? Ideally, they would not have to be blocked together but, if there is no other way, if I could have blocks of cells filled in all at once.

I am using Excel 2010.

only a few of us have Access but I will be the only one accessing the collected data. Besides, I would make Excel query the Access DB for more general use. I

View 2 Replies View Related

Excel 2010 :: SAVE AS File Name Using Macro?

Aug 13, 2012

USING EXCEL 2010

I am trying to record a macro where the last step is to SAVE AS the file. I want it to use the current date as the end of the file name.
i.e.

Daily OST -- 2012-08-10
Daily OST -- 2012-08-11
Daily OST -- 2012-08-12
etc...

This is what is currently in the macro but all it gives me is the first part "Daily OST --". How to fix?

ActiveWorkbook.SaveAs Filename:= _
"Y:ProjectsProgram ManagementPIODaily ReportsDaily OST -- " & DateString & ".xlsx" _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False

View 6 Replies View Related

Excel 2010 :: Getting Simple Macro For Paste Value

Oct 21, 2012

Need a simple macro for paste value - it used to work in Excel 2003 but not 2010.

View 1 Replies View Related

Excel 2010 :: Macro Does Not Exist In Workbook

May 8, 2013

We have recently converted to Office 2010 from 2007 I have now got a name conflict with some macros on my templates

I have some code which will open up the affected templates delete the required modules & import the amended modules, this is working OK.

I now have to re assign the new macro to each button on all pages on all my templates., I started of by recording the actions to achieve this (see part of the code), but unfortunately the recorded code will not work, it runs but when I test the buttons I get the message that "this macro does not exist in this work book".

Code:
Sheets("page 2").Select
ActiveSheet.Shapes.Range(Array("Button 255")).Select
Selection.OnAction = "DIAM01"
ActiveSheet.Shapes.Range(Array("Button 1549")).Select
Selection.OnAction = "DIAM02"

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

View 2 Replies View Related

Excel 2010 :: Insert Macro Not Working

Sep 20, 2013

I am using this macro below to paste pictures from a folder. This works perfect when run on excel 2007, however it only links image when this is run on excel 2010. How to eliminate the error.

Option Explicit
Sub alex_it_saving_lives()

'get the image folder path
Dim strImagePath As String
strImagePath = GetImageFolderPath
If (Len(strImagePath) = 0) Then

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

View 3 Replies View Related

Excel 2010 :: Crashes On Macro Exit?

Dec 20, 2013

The macro does numerous things, including deleting the sheet that was active when it is called. If the sheet is not deleted, there is no crash. Otherwise, Excel crashes as soon as the VBA interpreter hits "Exit Sub". The Excel message is simply "Excel Stopped Working". The macro also saves the workbook before finishing, and the saved workbook opens just fine, but it's unacceptable to have to kill Excel and restart it every time (I am not the main user for this spreadsheet). I'm using Excel 2010 on Windows 7.

View 7 Replies View Related

Excel 2010 :: Use Macro To Compare Two Sheets

Jul 18, 2014

I'm working to compare to sheet every days and i have been doing this for 2 years

I need to write macro to compare 2 columns from two sheets (sheet1 and sheet2) on same excel book and display the result on the sheet2. The number of rows and columns may not be equal and it can vary each time.

The result should be written in the sheet2 at column 'NOTES'

If serial number is blank, the result written at NOTES column =*NOT TRACK

If serial number found on sheet 1-serialNumber column, the result written at NOTES column =*Registered

If no serial number found on sheet 1-serialNumber column, the result written at NOTES column =*New registration

Example Sheet1:
PurchaseOrderNo
Manufacturer
ProductNumber
SerialNumber

PO123
Table
453154-B21

[Code] .....

I'm using excel 2010 and window 7.

View 9 Replies View Related

Excel 2010 :: Using Macro To Open Network File

Jan 5, 2014

I am an extreme novice to using macros.

I used the 'record macro' feature to create the following: I created a rectangle box on sheet1 of NEW TEST.xlsm to link to the macros incidated below. Niether macro moves on after reaching the Workbooks.Open statement.

I am at a loss. Is there something in Excel that needs to be set? Is there something else that I need to do version of Excel is 14.0.6129.5000 (32 bit) MS Office Professional Plus 2010

What I am trying to accomplish is this: From 'NEW TEST.xlsm', open an excel file on the network, add a new sheet to this network file, calling it 'Pivot'. Then create a pivot table in this new sheet from the data in sheet data1 of this same network file. Then move control of macro / processing back to the NEW TEST file. Eventually I will do more, but for starters, I cannot even get the macro to add / name a new sheet in the network file.

[SIZE=3][COLOR=#000000][FONT=Arial]PS I have attached the NEW TEST.xlsm fikle as we as the data file. NOTE: the data file has been reduced to one day's worth of data, to to the upload file size.Also, my Excel Trustred locations has "Allow trusted locations on my network" checked, and the network location to the data file in trusted user locations.

VB:

Sub Open_Add_Sheet()
Dim filename, filelocation As String
Dim wb As Workbook
filename = "11 Nov, 2013 GDO AHS Agent Productivity Report.xls"
filelocation = "R:acharukAHS ReportsGDOGDO CSR ACTIVITY Report2013" & filename
Set wb = Workbooks.Open(filelocation) '
' Open_Add_Sheet Macro

[Code]....

View 9 Replies View Related

Excel 2010 :: Writing Macro To Create Chart?

Feb 12, 2014

I have 6 columns. The 5th and 6th columns are the most important. The 5th contains a figure and the 6th contains a type.

Bascially I am trying to do a basic chart showing the following 2 things. A. Do a percentage chart of column 6 (service) but not of percentage of hoem many lines the product is in. Not based on percentage of how many times Apples are shown compared to other products. I need it to add up everything, then do a percentage of total amounts of oranges and total of for Apples from the figures on column 5. Also, if possible, the pie chart will even show teh actual total figure per product in each (or next to) each pie chart slice.

know the easiest way to do this (step by step) in Excel 2010 and then I can perhaps write a macro for the future?

View 1 Replies View Related

Excel 2010 :: Macro Automatically Runs At Workbooks?

Jun 20, 2014

On my work computer (Excel 2010, Win 7) when I am stepping through my VBA code using F8 and come to a Workbooks.Open line, the macro automatically kicks in and runs through to the end instead of just stepping to the next line of code. This happens nearly every time but occasionally it works as it should. To prevent this, I have to put a breakpoint on the next line following Workbooks.Open and after that I can step (F8) through the rest of the code. I have never had this problem before and it doesn't happen on my home computer.

View 4 Replies View Related

Excel 2010 :: How To Make Macro Print In Other File

Jun 26, 2014

Excel 2010.I'm using this code to print user's accessing a file:

[Code] .....

However as someone could just delete the printed user log in the Sheet2, and also you can't use this if you protect the sheet, which defeats the purpose.

I want it to print the log into a separate file. Can I add in the file path/name to this code somewhere?

View 1 Replies View Related







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