Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I use Send Keys to mimic pressing F2, then holding down SHIFT and CTRL together while pressing ENTER

Posted on 2006-10-29
3
210 Views
Last Modified: 2008-03-17
Before I do the above I need to select a particular cell holding a function in an Excel worksheet.
0
Comment
Question by:TimHudspith
3 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 400 total points
ID: 17829352
Why bother doing this?  Excel offers the FormulaArray property for a Range object; the only tricky part about
it is that your code has to use an R1C1-style reference and not an A1-style ref, but that is not a big deal.

Ultimately, what do you really need to do?

Patrick
0
 
LVL 32

Assisted Solution

by:Robberbaron (robr)
Robberbaron (robr) earned 100 total points
ID: 17832169
based upon what Patrick has shown....

1/ Put the following code in a VBA module.

Sub MakeArrayFormula()

    x = ActiveCell.FormulaR1C1
    ActiveCell.FormulaArray = x  
End Sub


2/ select the desired cell. Tools / Macro / Run / MakeArrayFormula / Run

works and doesnt change formula reference style.

3/ you can cerate a QuickKey combination. Tools / Macro / Run / MakeArrayFormula / Options / Ctrl -Z for example.
0
 

Author Comment

by:TimHudspith
ID: 17848478
matthewsPatrick - I have to admit I didn't really know what I was dealing with. Since you mentioned FormulaArray I've done some reading on it and have now worked out how to accomplish this using the FormulaArray property.  Thanks.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question