• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SendKeys "{F2}" and "{ENTER}"

dparteka

Member
I have a group of cells N6:N37 that need to be refreshed in order for the formulas to produce a return. This can be done manually by the key strokes F2 followed by the Enter key. I have been trying to create a macro like the one shown below but it does not work and might be a known Microsoft bug. My head is about to explode from the frustration because I can't be doing this manually each time. Is there anyone out there that has a solution to this dilemma? Thank you for looking.
Code:
Range("N6").Select
    SendKeys "{F2}"
    SendKeys "{ENTER}"
    SendKeys "{F2}"
    SendKeys "{ENTER}"
    SendKeys "{F2}"
    SendKeys "{ENTER}"
 
Here it is... works great
Code:
Dim r As Range, rr As Range
Set rr = Selection
For Each r In rr
    r.Select
    Application.SendKeys "{F2}"
    Application.SendKeys "{ENTER}"
    DoEvents
Next
 
Back
Top