98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Simon - Code for the timer
Simon - Code for the timer
Resolved · Low Priority · Version 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 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
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Hiding and unhiding columns using the keyboardCTRL + 0 hides your columns and CTRL + SHIFT + ) unhides them although you would need to highlight the column letters either side as per normal |