vba - Showing the updates being performed by macro -


so have seen ways hide screen updating in excel, i'm looking data problem, want see screen update. there way code screen update during macro slowly? tried following:

'//////adding screen updating watch what's happening application.screenupdating = true application.wait + timevalue("00:00:01") '/////

and got screen flicker.

thanks being excellent unto me.

what you're after better method of debugging errors. screenupdating property of application not want :)

instead, set breakpoint in code using f9, @ or before suspect error happening. if necessary, can put on first line of code (if literally have no idea error happens).

here breakpoint, it's red/maroon highlighted line:

breakpoint

then, using f8 key, can step through code line line.

you can add many breakpoints want. pressing f5 execute code next breakpoint, have f8 or f5 resume execution.

some additional things debug

use locals window.

locals window

this shows vairables in scope, , can click on them view properties/etc. can see, have shitload of variables in complicated application. i've found immeidates window helpful object variables , arrays. here looks when expand array variable, can see contents:

locals window closeup on array variable

use immediate window query variables or execute statements outside of code, equivalent debug.print statements. example, let's check see if value of variable "9", can:

?somevar = 9 , press enter. show true or false. query value directly ?somevar , print value.

in screenshot, checking value of boolean, , shows me value false. verify in locals window.

immediate window


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -