#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default Code to calc

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Code to calc

F9 will force Excel to recalculate the workbook.

Dave
--
Brevity is the soul of wit.


"Marcelo" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default Code to calc

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:

F9 will force Excel to recalculate the workbook.

Dave
--
Brevity is the soul of wit.


"Marcelo" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Code to calc

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.

Marcelo wrote:

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:

F9 will force Excel to recalculate the workbook.

Dave
--
Brevity is the soul of wit.


"Marcelo" wrote:

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


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Code to calc

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)

"Marcelo" wrote in message
...
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:

F9 will force Excel to recalculate the workbook.

Dave
--
Brevity is the soul of wit.


"Marcelo" wrote:

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





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default Code to calc

Hi Bob,

Perfect as usual ;-)


--
regards from Brazil
Marcelo



"Bob Phillips" escreveu:

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)

"Marcelo" wrote in message
...
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:

F9 will force Excel to recalculate the workbook.

Dave
--
Brevity is the soul of wit.


"Marcelo" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
regular code module billy boy Excel Discussion (Misc queries) 4 December 13th 05 07:30 PM
code not unique find latest date Barbara Wiseman Excel Discussion (Misc queries) 3 December 11th 05 08:50 AM
VLOOKUP for Zip Code Ranges JerseyJR Excel Worksheet Functions 2 September 6th 05 06:37 PM
Conform a total to a list of results? xmaveric Excel Discussion (Misc queries) 1 August 21st 05 07:22 PM
Macro for changing text to Proper Case JPriest Excel Worksheet Functions 3 August 8th 05 09:31 PM


All times are GMT +1. The time now is 07:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"