Home

CAN ANYONE HELP??? viewing results while a macro runs

%3CLINGO-SUB%20id%3D%22lingo-sub-1116518%22%20slang%3D%22en-US%22%3ECAN%20ANYONE%20HELP%3F%3F%3F%20viewing%20results%20while%20a%20macro%20runs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116518%22%20slang%3D%22en-US%22%3E%3CP%3EA%20week%20ago...%3C%2FP%3E%3CP%3EWhen%20I%20would%20run%20my%20testing%20macro%2C%20I%20would%20see%20the%20result%20of%20%3CSTRONG%3E%3CU%3EEACH%3C%2FU%3E%3C%2FSTRONG%3E%20of%20the%20100%20steps%20in%20the%20macro%20in%20the%20worksheet.%20I%20have%20a%20counter%20in%20the%20worksheet%20AND%20a%20graph%20display%20the%20results%20%3CSTRONG%3E%3CU%3ELIVE%3C%2FU%3E%3C%2FSTRONG%3E%20as%20the%20macro%20ran.%20The%20counter%20would%20COUNT%201%20to%20100%2C%20and%20the%20graph%20would%20display%20the%20REAL%20TIME%20results%20as%20the%20macro%20ran.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EToday...%3C%2FP%3E%3CP%3EWhen%20I%20run%20the%20same%20macro%20on%20the%20same%20worksheet%2C%20I%20do%20%3CU%3E%3CSTRONG%3ENOT%3C%2FSTRONG%3E%3C%2FU%3E%20see%20the%20live%20results%20while%20the%20macro%20runs.%20I%20only%20see%20the%20final%20results%20when%20it%20is%20completed.%20The%20counter%20only%20displays%20100%2C%20and%20the%20graph%20changes%20only%20when%20the%20macro%20is%20completed%20with%20all%20100%20tests.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20changed%3F%20I%20don't%20know%20if%20this%20is%20a%20change%20in%20Excel%2C%20or%20VBA%2C%20or%20some%20variable%20that%20I%20may%20have%20changed%20unintentionally.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20help%3F%3F%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1116518%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1116826%22%20slang%3D%22en-US%22%3ERe%3A%20CAN%20ANYONE%20HELP%3F%3F%3F%20viewing%20results%20while%20a%20macro%20runs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1116826%22%20slang%3D%22en-US%22%3EMaybe%20the%20screenupdating%20setting%20was%20changed%20in%20the%20VBA%20code%3F%20Do%20you%20have%20this%20line%20of%20code%20in%20your%20VBA%20code%3CBR%20%2F%3E%3CBR%20%2F%3EApplication.ScreenUpdating%20%3D%20False%3F%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1117155%22%20slang%3D%22en-US%22%3ERe%3A%20CAN%20ANYONE%20HELP%3F%3F%3F%20viewing%20results%20while%20a%20macro%20runs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1117155%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F422482%22%20target%3D%22_blank%22%3E%40PascalKTeam%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20note...but%20No%2C%20I%20do%20not%20have%20this%20line%20in%20my%20code.%20I%20tried%20adding%20this%20line%2C%20but%20with%20TRUE%2C%20and%20no%20change%20when%20running.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20pulling%20my%20hair%20out%20as%20nothing%20changed%20in%20either%20the%20worksheet%20or%20the%20macro.%20Ugh!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20other%20ideas%3F%20I%20am%20open%20to%20anything%20at%20this%20point.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1117157%22%20slang%3D%22en-US%22%3ERe%3A%20CAN%20ANYONE%20HELP%3F%3F%3F%20viewing%20results%20while%20a%20macro%20runs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1117157%22%20slang%3D%22en-US%22%3ECan%20you%20post%20the%20file%3F%20Or%20at%20least%20the%20code%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1117158%22%20slang%3D%22en-US%22%3ERe%3A%20CAN%20ANYONE%20HELP%3F%3F%3F%20viewing%20results%20while%20a%20macro%20runs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1117158%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F422482%22%20target%3D%22_blank%22%3E%40PascalKTeam%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDon't%20laugh%20at%20my%20programing...I%20am%20relatively%20new%20at%20this.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1117173%22%20slang%3D%22en-US%22%3ERe%3A%20CAN%20ANYONE%20HELP%3F%3F%3F%20viewing%20results%20while%20a%20macro%20runs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1117173%22%20slang%3D%22en-US%22%3Ethanks%20for%20the%20code%3CBR%20%2F%3EThe%20macro%20actually%20does%20fill%20each%20row%20step%20by%20step.%20Have%20you%20changed%20to%20a%20PC%20with%20better%20performance%3F%20This%20could%20be%20a%20reason%20for%20not%20seeing%20the%20single%20steps%20of%20the%20macro.%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20you%20could%20do%20is%20to%20add%20this%20line%20of%20code%20between%20the%20steps%2C%20this%20will%20pause%20the%20VBA%20execution%20for%201%20second%3CBR%20%2F%3E%3CBR%20%2F%3EApplication.Wait%20(Now%20%2B%20TimeValue(%220%3A00%3A01%22))%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1117179%22%20slang%3D%22en-US%22%3ERe%3A%20CAN%20ANYONE%20HELP%3F%3F%3F%20viewing%20results%20while%20a%20macro%20runs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1117179%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F422482%22%20target%3D%22_blank%22%3E%40PascalKTeam%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20try%20this...but%20I%20really%20don't%20want%20to%20wait%20100%20seconds%20for%20the%20testing%20to%20complete.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBefore%2C%20it%20would%20take%20maybe%2010%20seconds%20to%20complete%2C%20but%20I%20could%20see%20it%20working.%20The%20way%20it%20is%2C%20I%20don't%20know%20if%20it%20is%20working%2C%20if%20it%20is%20completed%20with%20a%20new%20test...unless%20I%20notice%20the%20new%20results%20in%20the%20worksheet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%2C%20let%20me%20try%20this%20an%20get%20back%20to%20you%20later.%20Thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1117187%22%20slang%3D%22en-US%22%3ERe%3A%20CAN%20ANYONE%20HELP%3F%3F%3F%20viewing%20results%20while%20a%20macro%20runs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1117187%22%20slang%3D%22en-US%22%3ESo%20you%20want%20to%20see%20it%20run%20in%20order%20to%20be%20sure%20that%20it%20actually%20did%20something%3F%3CBR%20%2F%3E%3CBR%20%2F%3EI%20guess%20there%20would%20be%20easier%20ways.%3CBR%20%2F%3EMy%20preferred%20solution%3A%20trust%20your%20code...%3CBR%20%2F%3ESecond%20option%3A%20add%20a%20messagebox%20at%20the%20end%20of%20the%20code%20which%20just%20says%20that%20the%20code%20did%20actually%20run%3C%2FLINGO-BODY%3E
Gary_Schroeder
New Contributor

A week ago...

When I would run my testing macro, I would see the result of EACH of the 100 steps in the macro in the worksheet. I have a counter in the worksheet AND a graph display the results LIVE as the macro ran. The counter would COUNT 1 to 100, and the graph would display the REAL TIME results as the macro ran.

 

Today...

When I run the same macro on the same worksheet, I do NOT see the live results while the macro runs. I only see the final results when it is completed. The counter only displays 100, and the graph changes only when the macro is completed with all 100 tests. 

 

What changed? I don't know if this is a change in Excel, or VBA, or some variable that I may have changed unintentionally.

 

Can anyone help????

7 Replies
Highlighted
Maybe the screenupdating setting was changed in the VBA code? Do you have this line of code in your VBA code

Application.ScreenUpdating = False?
Highlighted

@PascalKTeam 

 

Thanks for the note...but No, I do not have this line in my code. I tried adding this line, but with TRUE, and no change when running.

 

I am pulling my hair out as nothing changed in either the worksheet or the macro. Ugh!

 

Any other ideas? I am open to anything at this point.

Highlighted
Can you post the file? Or at least the code?
Highlighted

@PascalKTeam 

 

Don't laugh at my programing...I am relatively new at this.

Highlighted
thanks for the code
The macro actually does fill each row step by step. Have you changed to a PC with better performance? This could be a reason for not seeing the single steps of the macro.

What you could do is to add this line of code between the steps, this will pause the VBA execution for 1 second

Application.Wait (Now + TimeValue("0:00:01"))
Highlighted

@PascalKTeam 

 

I will try this...but I really don't want to wait 100 seconds for the testing to complete.

 

Before, it would take maybe 10 seconds to complete, but I could see it working. The way it is, I don't know if it is working, if it is completed with a new test...unless I notice the new results in the worksheet.

 

But, let me try this an get back to you later. Thanks.

Highlighted
So you want to see it run in order to be sure that it actually did something?

I guess there would be easier ways.
My preferred solution: trust your code...
Second option: add a messagebox at the end of the code which just says that the code did actually run