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
213 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
[X]
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
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

615 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