View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stan Stan is offline
external usenet poster
 
Posts: 150
Default Calculate Selected cells only.

Chuck,
Thank you for your reply.
I get an error when trying to execute your sub:

Run-time error '1004':
Calculate method of Range class failed


When I hit Debug the
..calculate
line is highlighted.

This is the same error as before. I am fairly new to VBA and probably doing
something silly - but for the life of me can not figure out what it is.
Thanks again!
Stan

"CLR" wrote:

Try this...........

Sub ConditionalRecalc()
With Selection
.Calculate
End With
End Sub

Vaya con Dios,
Chuck, CABGx3



"Stan" wrote:

Hi All,

I am not sure if this is the right forum for a VBA question, but I did not
find a more suitable one.

I have a large workbook that takes a very long time to re-calculate so I am
forced to turn off auto calc while working. However I need to re-calc some
specific cells every time I update their formulas. I have an XLA addin
automatically load that has a sub for calculating ONLY the selected cells
withough re-calc-ing the whole nine yards.

Sub CalcSelected()
Selection.Calculate
End Sub

I am getting errors, I even get an error if I move the sub into a module in
the very spreadsheet I am working on.
Does anyone know how to do this correctly?
Thanks in advance!
Stan