Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Screenupdating = FALSE not working
I have an Excel model with several VBA macros that I have been maintaining in
Excel 2003 for years with no issues. I recently updated to Office 2007, made some adjustments to the model, and it works fine on my machine (and fine on some of my coworkers' machines). However, the exact same file when run on other coworkers' machines is having issues where the "Application.screenupdating" is being set to true whenever the code switches worksheets or workbooks. For example: Sub ProcessName() Application.Screenupdating = FALSE Sheets("Sheet 1").Range("Range 1").clearcontents Sheets("Sheet 2").Range("Range 2").clearcontents 'Up to this point, Screenupdating=FALSE on ALL machines Sheets("Sheet 3").Select 'At this point, Screenupdating=FALSE on some machines and TRUE on others Range("Range 3").Select Selection.Validation.Delete Application.Screenupdating = TRUE End Sub Again, when running on some machines - no problem (screenupdating remains set to false at all times), but when run on another machines, it switches to true. We all are running Office 2007. I have seen many posts on various forums regarding similar issues, but nothing regarding screenupdating working on one machine but not another. Is there an Excel Options setting that could be different between our machines that could be causing this? Thanks for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Screenupdating = FALSE not working
Try it this way:
Sub ProcessName() Application.Screenupdating = FALSE Sheets("Sheet 1").Range("Range 1").clearcontents Sheets("Sheet 2").Range("Range 2").clearcontents 'Up to this point, Screenupdating=FALSE on ALL machines Sheets("Sheet 3").Range("Range 3").Validation.Delete Application.Screenupdating = TRUE End Sub "VBAActuary" wrote in message ... I have an Excel model with several VBA macros that I have been maintaining in Excel 2003 for years with no issues. I recently updated to Office 2007, made some adjustments to the model, and it works fine on my machine (and fine on some of my coworkers' machines). However, the exact same file when run on other coworkers' machines is having issues where the "Application.screenupdating" is being set to true whenever the code switches worksheets or workbooks. For example: Sub ProcessName() Application.Screenupdating = FALSE Sheets("Sheet 1").Range("Range 1").clearcontents Sheets("Sheet 2").Range("Range 2").clearcontents 'Up to this point, Screenupdating=FALSE on ALL machines Sheets("Sheet 3").Select 'At this point, Screenupdating=FALSE on some machines and TRUE on others Range("Range 3").Select Selection.Validation.Delete Application.Screenupdating = TRUE End Sub Again, when running on some machines - no problem (screenupdating remains set to false at all times), but when run on another machines, it switches to true. We all are running Office 2007. I have seen many posts on various forums regarding similar issues, but nothing regarding screenupdating working on one machine but not another. Is there an Excel Options setting that could be different between our machines that could be causing this? Thanks for any help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Screenupdating = FALSE not working
Thank you for the response. Unfortunately, the code I provided as an example
is an extremely simplified excerpt from the larger model (I should have clarified). The model contains thousands of lines of code over several modules and userforms, and requires the opening and closing of other Excel workbooks. So I need to understand what is causing the issue, as unfortunately I don't think any easy work-around will suffice here. "JLGWhiz" wrote: Try it this way: Sub ProcessName() Application.Screenupdating = FALSE Sheets("Sheet 1").Range("Range 1").clearcontents Sheets("Sheet 2").Range("Range 2").clearcontents 'Up to this point, Screenupdating=FALSE on ALL machines Sheets("Sheet 3").Range("Range 3").Validation.Delete Application.Screenupdating = TRUE End Sub "VBAActuary" wrote in message ... I have an Excel model with several VBA macros that I have been maintaining in Excel 2003 for years with no issues. I recently updated to Office 2007, made some adjustments to the model, and it works fine on my machine (and fine on some of my coworkers' machines). However, the exact same file when run on other coworkers' machines is having issues where the "Application.screenupdating" is being set to true whenever the code switches worksheets or workbooks. For example: Sub ProcessName() Application.Screenupdating = FALSE Sheets("Sheet 1").Range("Range 1").clearcontents Sheets("Sheet 2").Range("Range 2").clearcontents 'Up to this point, Screenupdating=FALSE on ALL machines Sheets("Sheet 3").Select 'At this point, Screenupdating=FALSE on some machines and TRUE on others Range("Range 3").Select Selection.Validation.Delete Application.Screenupdating = TRUE End Sub Again, when running on some machines - no problem (screenupdating remains set to false at all times), but when run on another machines, it switches to true. We all are running Office 2007. I have seen many posts on various forums regarding similar issues, but nothing regarding screenupdating working on one machine but not another. Is there an Excel Options setting that could be different between our machines that could be causing this? Thanks for any help. . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Screenupdating = FALSE not working
The best I can do is recommend that you purge your code of the Select method
and use the direct address method as illustrated in the snippet I suggested. That eliminates the need for the ScreenUpdating in 90 percent of the cases. Every use of Select tries to trigger a screen update. Some versions of Excel might react differently to the ScreenUpdating code feature. "VBAActuary" wrote in message ... Thank you for the response. Unfortunately, the code I provided as an example is an extremely simplified excerpt from the larger model (I should have clarified). The model contains thousands of lines of code over several modules and userforms, and requires the opening and closing of other Excel workbooks. So I need to understand what is causing the issue, as unfortunately I don't think any easy work-around will suffice here. "JLGWhiz" wrote: Try it this way: Sub ProcessName() Application.Screenupdating = FALSE Sheets("Sheet 1").Range("Range 1").clearcontents Sheets("Sheet 2").Range("Range 2").clearcontents 'Up to this point, Screenupdating=FALSE on ALL machines Sheets("Sheet 3").Range("Range 3").Validation.Delete Application.Screenupdating = TRUE End Sub "VBAActuary" wrote in message ... I have an Excel model with several VBA macros that I have been maintaining in Excel 2003 for years with no issues. I recently updated to Office 2007, made some adjustments to the model, and it works fine on my machine (and fine on some of my coworkers' machines). However, the exact same file when run on other coworkers' machines is having issues where the "Application.screenupdating" is being set to true whenever the code switches worksheets or workbooks. For example: Sub ProcessName() Application.Screenupdating = FALSE Sheets("Sheet 1").Range("Range 1").clearcontents Sheets("Sheet 2").Range("Range 2").clearcontents 'Up to this point, Screenupdating=FALSE on ALL machines Sheets("Sheet 3").Select 'At this point, Screenupdating=FALSE on some machines and TRUE on others Range("Range 3").Select Selection.Validation.Delete Application.Screenupdating = TRUE End Sub Again, when running on some machines - no problem (screenupdating remains set to false at all times), but when run on another machines, it switches to true. We all are running Office 2007. I have seen many posts on various forums regarding similar issues, but nothing regarding screenupdating working on one machine but not another. Is there an Excel Options setting that could be different between our machines that could be causing this? Thanks for any help. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
screenupdating=false not working | Excel Programming | |||
Screenupdating=false not working | Excel Programming | |||
'Application.ScreenUpdating = False' isn't working | Excel Programming | |||
ScreenUpdating = False not working | Excel Programming | |||
ScreenUpdating = False not working | Excel Programming |