View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Auto Calculate selected worksheets

garygoodguy explained :
Where would I place this code? I'm assuming in the sheet, i.e Sheet1?
Under what private sub?
Or would I place this under Workbook_open in 'ThisWorkbook'?


It depends when you want it to calculate! If when the file opens then
in the Workbook_Open event. If before the file closes then in the
Workbook_BeforeClose event. If when you click a button or custom
menuitem then in a standard module sub named appropriate to its use.

Sub CalculateSheet()
Sheets("Sheet1").UsedRange.Columns("A:C").Calculat e
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion