Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

simon code timer

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Simon - Code for the timer

Simon - Code for the timer

ResolvedVersion 2007

Louisa has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course

Simon - Code for the timer

Hi,

As above you said to post here so I could get the code for the timer.

Thanks

Louisa

RE: Simon - Code for the timer

Hi Louisa,

Thank you for your request.

If you open the SalesPerson Report in from the VB editor screen and go to the Declarations area and:

1. Create a new public variable Public MyTimer as Double

2. Add MyTimer = Timer before the first procedure in the calling procedure.

3. Then add msgbox Timer - MyTimer after the IF statement

I hope this makes sense.

Let me know how long it took to run via the form.

Regards

Simon

RE: Simon - Code for the timer

Hi Louisa,

Further to the email I sent you.

Can you please put the MyTimer = Timer above the call deletespsheet in the CreateSPSheet procedure.

Add the msgbox Timer - MyTimer before end sub in the pivot table code.

Regards

Simon

RE: Simon - Code for the timer

It worked in 0.09 seconds. The only problem being if you forget to select pivot then the timer doesn't work due to where it in the code :-)

Thanks

Louisa

RE: Simon - Code for the timer

Hi Louisa,

Thank you for responding. You are quite right about the position of the timer. Sorry I didn't mention it.

Good luck with your VBA endeavours.

Regards

Simon

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Hiding and unhiding rows using the keyboard

CTRL + 9 hides your columns and CTRL + SHIFT + ( unhides them although you would need to highlight the row letters either side as per normal

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.