Code to calc

M

Marcelo

hi guys,

sorry for the stupid question but...

I would like a code to calculate the wb when a cell value change, could you
help?

regards from Brazil

Marcelo
 
M

Marcelo

Dave thanks for your help,

I am talking about a ruge wb and it will be used by tge final users, I have
been forced the manual calculation, what I'm looking for is a code that when
the people selected a customer in a drop down box the refers cell will change
and excel calc it.

--
regards from Brazil
Marcelo



"Dave F" escreveu:
 
D

Dave Peterson

Maybe one of these (depending on what version of excel you're using--and what
you want to do):

Application.Calculate
Application.CalculateFull
application.CalculateFullRebuild

Look at VBA's help for details.
 
B

Bob Phillips

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "B1:B40"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
Me.Calculate
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub



'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.





--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
M

Marcelo

Hi Bob,

Perfect as usual ;-)


--
regards from Brazil
Marcelo



"Bob Phillips" escreveu:
 
Top