Vb6 screen updating

In VB for excel i've used Screenupdating=false to disable the screen updating however now i'm creating a visual studio 2010 windows forms application and its not showing up as a property. I would just like to know what possibilities there are. Public class Private Sub Button1_Click(By Val sender As System. Text & "'" Dim mycommand As New My Sql Command() Dim myadapter As New My Sql Data Adapter() Dim mydata As My Sql Data Reader mycommand. I always assumed it was just used so that it didn't scare end users into thinking their PC was about to crash.Use this code template as a starting point (the error handler ensures that these properties are turned back on at the end of the sub, even if it errors) Sub Your Sub() On Error Go To EH Application. Select Next i 'get results results = "Screen Updating not disabled: " & Format(Time - start Time, "hh:mm:ss") & " seconds" start Time = Time 'scenario 2 - screenupdating disabled Application.Screen Updating = False 'swap between sheets 1/2 (need both sheets or this will crash) For i = 1 To numb Switches Sheets(1 (i Mod 2)). Screen Updating = True 'get results for part two results = results & vb Cr Lf & "Screen Updating IS disabled: " & Format(Time - start Time, "hh:mm:ss") & " seconds" 'show results Msg Box results End Sub Firstly I've been using the script written by Richie (UK) Post #7 Here It simply iterates through a loop changing the value of i in one cell.And after all don’t turn screen updating on/off many times in some loop. And one more note (which you probably don’t want to hear) if you want it quick use C .It is typically 5 to 10 times quicker (don’t catch me here it depends on what you really do) than VBA.but in the informal testing I've done, I've found that Visible = False makes Word work roughly 15% faster than Screen Updating = False does on identical tasks.That's about 1 second for every 7-not a trivial amount if your job runs longer than that. Chief among them is that repagination routines don't work when Word is invisible.

vb6 screen updating-38vb6 screen updating-11vb6 screen updating-24

My requirement is to work on another worksheet of the same workbook... I've written several macro programs that take a while to execute. For example, one program I alone use takes about 40 seconds to execute across 12 similar sheets.

You can verify this by launching Word the old-fashioned way and opening File1 at the bottom of the File menu after running the sample code.

Although it would be difficult to do an exhaustive test, in theory this should work from any Automation client-Visual Basic, Excel, Power Point, or any other.

The functionality depends on Word, not on the Automation client.

But it also works even if you run your Automation code from Word itself.

Leave a Reply