Stop Recalculating?

S

stupler

I'm hoping that someone could help me with a problem I have with an
Excel game I'm making.
'This is the spreadsheet I am having problems with'
(http://uk.geocities.com/ueverwondered/DONDExcelHelp.xls). I'm hoping
this will help me in explaining my problem, since I'm pretty new to the
macro side of things.

It doesn't matter too much if you choose to run macros or not. The
problem lays with the cell to the right of the "Dealt at:" text. It
works by getting the number in the cell next to the "Offer:" text. If
the player types "deal" into the cell above the "Dealt At:" cells, the
cell to the right of the "Dealt At:" text will display whats in that
cell.
But if the player plays on, that number to the right of the "Dealt At:"
text will change too, which I'd like to remain at the first number it is
(when the player typed "deal").

Is it a matter of stopping it recalculating or something else?

(The game is'nt finished, by the way! :) )
 
V

vezerid

stupler,

I looked into your file, I cannot understand what it does, but since
you are using VBA, you might find the following helpful:

Application.Calculation = xlCalculationManual
....
Application.Calculation = xlCalculationAutomatic

These two lines can be inserted above and below some code to
temporarily suspend automatic recalculation. They could also be used in
an event macro for the sheet, i.e. a macro that is invoked when an
event fires that Excel traps. In your case this would be the

Private Sub Worksheet_Change(ByVal Target As Range)

This is a predefined macro, empty until you fill it. To get there,
double click the corresponding sheet icon in the Project Manager (in
VBA IDE). Once the window is open, at the top there are two drop-down
boxes. The left displays General. Switch to Worksheet. Then, at the
right, you can see the available events for the worksheet.

HTH
Kostis Vezerides
 
Top