Hi there,
I made a vba code with double click function
i wonder if there is a cleanup necessary for make it go faster?
![]()
Please Login or Register to view this content.
Hi there,
I made a vba code with double click function
i wonder if there is a cleanup necessary for make it go faster?
![]()
Please Login or Register to view this content.
Hi Ya,
Not sure what does the macro do? But I dont see any unwanted codes in there.
Thanks,
Bonny Tycoon
**If I was able to help please click the small star icon at the bottom left of my post **
Ok thanks
is there no way to speed up the code? because its verry slow.
bye the way its for a sport event. for the scoring paper.
One way:
Change this lineto![]()
Please Login or Register to view this content.
Then at the end just before you exit the sub, turn everything back on via:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Perhaps it was the Noid who should have avoided me...
If you are satisfied with my solution click the small star icon on the left. Thanks
1. Make a copy of your workbook and run the following code on your copy (just in case)
2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
3. Paste the code from above into the empty white space. Close the VBE.
4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".
Hi,
I dont see a challenge as to why it would be slow.. Is the source data too big??
Thanks,
Bonny Tycoon
**If I was able to help please click the small star icon at the bottom left of my post **
When changing calculation to manual using code, it is best not to assume the current method is automatic. Store the value in a string variable before you change it to manual. Then use the string variable to change it back at the end.
Also, read this:
http://blogs.office.com/b/microsoft-...practices.aspx
You can also use With...End With to clean things up a bit. Also, avoid Select as much as possible.
![]()
Please Login or Register to view this content.
Last edited by Whizbang; 04-30-2012 at 01:18 PM.
promoboy2,
Give this a try:
![]()
Please Login or Register to view this content.
Last edited by tigeravatar; 04-30-2012 at 05:05 PM.
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
Thank you all
i tried everything you suggested and found the fastest way.
AlvaroSiza, I hope you don't mind me sharing this, but others may benefit from the question/answer.
By changing the calculation state via VBA, you change the expected behavior. A user that has it set as manual will expect it to stay in manual after the code is run. And of course the opposite is true. But then, as you point out, it may be that calculation does not occur because you are changing from manual to manual. The fix for this is to force a calculation when necessary.Originally Posted by AlvaroSiza
http://msdn.microsoft.com/en-us/libr...ffice.11).aspx![]()
Please Login or Register to view this content.
The nice thing about the Calculate method is that you can calculate the entire workbook, a specific sheet, or even a specific range.
There's some good information about this topic at this link as well:
http://www.ozgrid.com/VBA/calc-stop.htm
Deleted. Moved to new thread.
Last edited by AlvaroSiza; 05-03-2012 at 06:23 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks