Well, the function is quite long, but you're looking at the function's entry point. The immediate window says True, then False, then True again as expected, but the code doesn't seem to have any effect on the application. If all of this happens, then you know it is working correctly. Net 2003 and Office 2010 Code: Excel Graphing | Excel Timer | Excel Tips and Tricks | Add controls in Office | Data tables in Excel | Gaussian random number distribution (VB6/VBA, VB. Screen Updating = False If my Debug = False Then On Error Go To Error Handler I'm afraid that's pretty much it. Screen Updating End Sub As I step through the code when I hove over Application.screen Updating it always says True. Then put it in debug mode and step through with screen updating turned off again, you should find that you still see the numbers going in one by one. Screen Updating = false" because I saw the yellow highlight go over the line in debug mode. Calculation = xl Calculation Automatic Application. Screen Updating from within the code instead of the immediate window, but I'm fairly sure what I'll find. This function gets called by an event handler that catches a Commands Bar button event (? Basically, we create a menu bar and one of the buttons in our custom "File" menu is labeled "Load Portfolio" which calls this function. I have encountered the same symptoms and can't think as to why it's happening. I think that maybe something has broken in my excel because even when I closed out of excel and opened a brand new 2003 workbook with no previous code I was getting the same problem. The interesting thing is that *some* of my modules allow Screen Updating to be set to False, there's only a few that don't. However, I *can* change the Screen Updating from the immediate window. Screen Updating = False b Global Change Event = True Application. About to go home for the day, but I plan on trying to print Application. So while Screen Updating always is True in debug mode, this is not the issue for me.I suspect a major reason for this is not being able to turn off screenupdating for powerpoint. Below is the code-snippet I have borrowed and an example of how I try to call it: Option Explicit ' User Defined Error codes Const ERR_NO_WINDOW_HANDLE As Long = 1000 Const ERR_WINDOW_LOCK_FAIL As Long = 1001 Const ERR_VERSION_NOT_SUPPORTED As Long = 1002 ' API declarations for Find Window() & Lock Window Update() ' Use Find Window API to locate the Power Point handle.Declare Function Find Window Lib "user32" Alias "Find Window A" (By Val lp Class Name As String, By Val lp Window Name As Long) As Long ' Use Lock Window Update to prevent/enable window refresh Declare Function Lock Window Update Lib "user32" (By Val hwnd Lock As Long) As Long ' Use Update Window to force a refresh of the Power Point window Declare Function Update Window Lib "user32" (By Val hwnd As Long) As Long Property Let Screen Updating(State As Boolean) Static hwnd As Long Dim Version No As String ' Get Version Number If State = False Then Version No = Left(Application. Version, ".") - 1) 'Get handle to the main application window using Class Name Select Case Version No Case "8" ' For PPT97: hwnd = Find Window("PP97Frame Class", 0&) Case "9" ' For PPT2K: hwnd = Find Window("PP9Frame Class", 0&) Case "10" ' For XP: hwnd = Find Window("PP10Frame Class", 0&) Case "11" ' For 2003: hwnd = Find Window("PP11Frame Class", 0&) Case "12" ' For 2007: hwnd = Find Window("PP12Frame Class", 0&) Case "14" ' For 2010: hwnd = Find Window("PPTFrame Class", 0&) Case Else Err.(Microsoft Word is the most popular word processing software in the world.) This tip (749) applies to Microsoft Word 97, 2000, 2002, and 2003.
is your source for cost-effective Microsoft Word training.Raise Number:=vb Object Error ERR_VERSION_NOT_SUPPORTED, _ Description:="Newer version." Exit Property End Select If hwnd = 0 Then Err.Raise Number:=vb Object Error ERR_NO_WINDOW_HANDLE, _ Description:="Unable to get the Power Point Window handle" Exit Property End If If Lock Window Update(hwnd) = 0 Then Err., Excel and VBA expert Curt Frye introduces object-oriented programming and shows how to automate routine tasks and provide custom functionality to enhance Excel performance and efficiency.This course introduces the Visual Basic for Applications programming language, covers creating subroutines and functions to hold code, and provides a solid grounding in the Excel 2007 object model. Sub load Portfolio() Dim i Test As Integer, portfolio Version As String Application. :-) Basically, after all those statements (and between each one) Screen Updating remains "True". Screen Updating = False For i = 1 To 10000 Worksheets("Sheet1"). Screenupdating = False worked perfectly in Excel 2007 until last week, when it remained True however many times I tried to set it to False.