Simple Macro, Slow Calculation. Help speed up please

jlieu

New Member
Joined
Jun 9, 2015
Messages
11
I have a very simple command button that adds 1 to a cell like a tally.

Code:
Dim whiteBloodCell As Integer
whiteBloodCell = Range("E10").Value + 1
Range("E10").Select
ActiveCell.FormulaR1C1 = whiteBloodCell

The problem I have is that lets say I see 2 white blood cells. I want to double click the command button, but it only lets me click the command button at about one click per second. I was wondering if anyone knew a way so that there is no lag in computation. Running a dual core i5 with 8 gb of ram if that helps. Thank you everyone in advance!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Is that all of the code under the command button ??
You don't need to keep using Select to work with a cell !
Code:
Range("E10").Value=Range("E10").value +1
 
Upvote 0
Yep, that's everything. I'm pretty stumped why excel would limit me to such few clicks per second.
 
Upvote 0
Oh, that looks way better than mine. Much more compact. I tried switching it out for my code. It still takes a minimum of 1 second before I can click again.
 
Upvote 0
I feel like it does help not selecting the cell. Still a little wonky with double clicks, but doing 3+ helps a lot. That's good enough for me, thank you very much!!
 
Upvote 0
If that is all the code for that action, I'm wondering if you have some recalculation events going on ??
As My aswer is this stated, this should work as fast as you can click the mouse !!
So, is there a whole heap of other cells affected by this mouse click ??
If so, maybe you need to do a Manual calculation until all code is completed !
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,172
Members
448,870
Latest member
max_pedreira

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top