Hi,
Sorry - didn't see your attachment.
Link your button to the following macro, which can just live in a module:
Sub refreshRange()
Range("B40:B54").Calculate
End Sub

Alternatively, you could do away with the button and have the macro fire 
whenever you change B39. This macro would live in the VBA sheet window:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$39" Then
For Each c In Range("B40:B54")
If c.HasFormula = True Then c.Calculate
Next c
End If
End Sub

Regards - Dave

 
> Date: Thu, 17 Feb 2011 12:52:37 +0700
> From: squall.l...@gmail.com
> To: excel-macros@googlegroups.com
> Subject: $$Excel-Macros$$ Refresh cell formula using VBA
> 
> Hi experts,
> 
> Please help to solve my problem regarding refreshing cell containing 
> formula/function using button (vba).
> My apologize if someone has already post the same problem before, but 
> believe me it's my best attempt to search it beforehand to avoid double 
> post ;)
> 
> 
> What I need is a method or code in VBA to seemlessly "F2" the cell and 
> hitting "Enter Button" to refresh my cell.
> Please find the attached example of my request.
> 
> Thanks in advance,
> 
> 
> ~Aduh~
> 
> -- 
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links : 
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
> 
> To post to this group, send email to excel-macros@googlegroups.com
> 
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
                                          

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to